As you already know, when you install Git, you have to configure your username and e-mail, but this isn't the only one configuration you can do:
Erik@server~:$ git config --global user.name 'Erik' Erik@server~:$ git config --global user.email '[email protected]'
Git uses a series of configuration files to perform various activities. First, Git checks the /etc/gitconfig
file that contains configurations for every user.
Then, Git looks in ~/.gitconfig
, which is specific to each user. Finally, Git checks the .git/config
file inside the repository.
There are a lot of options available, but we will cover only the commonly used. You can see a list of all options executing this:
Erik@server~:$ git config -help
You will find a lot of options to play with, but here are the most important ones: