This Git Config Basics Tutorial will help you find out how configuration works and how you can configure your git
Types of Configuration
This configuration file is found at: /etc/gitconfig. This contains the default values for all users on the system.
git config --system
Found at: ~/.gitconfig. This is the configuration of a specific user.
git config --global
Found at .git/config of each project.
So the configuration process is much like that of apache with the system: httpd.conf
Configure you Git Identity:
This is the identity data that is stored with every commit you make, o it is good practice to make the email valid and name professional.
git config --global user.name "Number 1"git config --global user.email email@example.com
You can use (–system, –global or no argument for project specific config)
Configure your Git Editor:
Configuring your git editor is an important step, as we all have out favourite editors. The default for most system is vim however you change it using the following command:
git config --global core.editor emacs
The same editor can be used as your diff tool and mergetool:
git config --global merge.tool meldgit config --global diff.tool meld
I find that using a graphical merge and diff tool is easier for me.
Checking your Git Settings:
git config --listuser.name=Number firstname.lastname@example.org=auto
Git Config Basics Help
git help configgit help <verb>git <verb> --helpman git-<verb>
Taken from Chapter 1: Pro Git