Configure Git
- config
There are three levels of configuration: System (–system) User (–global) Project (–local)
$ git config …
On Unix
- /etc/gitconfig
- $HOME/.gitconfig (/home/foobar/.gitconfig)
- .git/config
On Windows
- “c:\Program Files (x86)\Git\etc\gitconfig”
- %HOMEPATH%.gitconfig %USERPROFILE%.gitconfig (C:\Users\Foobar.gitconfig)
- .git/config
To access them use
--system
--global
--local
Samples:
$ git config --global --add user.name "Foo Bar"
$ git config --global --add user.email foo@bar.com
$ git config --list
$ git config --list --global
$ git config user.name # to see specific value