0%

git-初始化

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# 配置上传账户信息
# commit时会带上这些信息
git config --global user.name ravenfu
git config --global user.email ravenfu@aliyun.com

# windowns 专用配置
# git config --global core.autocrlf false
# git config --global core.longpaths true

# 设置中文路径输出
git config --global core.quotepath false

# 设置 git 默认编辑工具 默认是 nano
git config --global core.editor vim

# 设置全局钩子
# 将 全局钩子脚本 放在 `~/.git_template/hooks` 下
# 之后所有 `git init` 后 `.git/hooks` 目录下的钩子都从这个目录下取
git config --global init.templatedir ~/.git_template

# 以下这步生成 ssh key, 用于配置在代码管理应用, 方便下载代码
ssh-keygen