git配置

1
2
3

$ git config --global user.name "John Doe"
$ git config --global user.email [email protected]
1
2
3
4
5
6
7
8
9
10
11
12
//查已有的配置信息,可以使用 git config --list 命令
$ git config --list
user.name=Scott Chacon
[email protected]
color.status=auto
color.branch=auto
color.interactive=auto
color.diff=auto
...
//查阅某个环境变量的设定
$ git config user.name
Scott Chacon
1
2
3
4
5
//使用帮助
$ git help <verb>
$ git <verb> --help
$ man git-<verb>
$ git help config