- 系统:读
/etc/gitconfig该文件。(传递--system选项) - 全局:查找每个用户的
~/.gitconfig文件(或者~/.config/git/config文件)。(传递--global选项) - 本地:查找工程Git 目录下的配置文件(
.git/config)。 这个文件中的值只对该版本库有效。
以上三个层次中每层的配置(系统、全局、本地)都会覆盖掉上一层次的配置,所以 .git/config 中的值会覆盖掉 /etc/gitconfig 中所对应的值。
1,设置你的名字和邮件地址
$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com
2,设置你的默认的编辑器
$ git config --global core.editor vim
3,设置Git 中的着色与字体属性
$ git config --global color.ui auto
color.branch 、color.diff 、color.interactive 、color.status 定制着色为 normal、black、red、green、yellow、blue、

最低0.47元/天 解锁文章
766

被折叠的 条评论
为什么被折叠?



