How to set up Git for use in KDE.
Your Git configuration operates at 3 levels:
The System Level sets up global Git configuration defaults for every User and Repository on your system. We will ignore these for our purposes as they are usually blank.
The User Level sets up the default configuration for a particular User to apply to all repositories used by that User. Settings made at this level will always override any matching System Level settings. The User Configuration is stored in your ~/.gitconfig file.
The Repository Level sets up the configuration for a particular Repository clone. Settings made at this level will always override any matching User or System Level settings. The Repository Configuration is stored in the repository .git/config file.
The recommended KDE Git Configuration will set some settings at a user level and some at a repository level. You may wish to change the level some settings apply at however as we will assume you only or mostly use Git for developing KDE.
Instead of having to remember and type in the different full git addresses for pulling and pushing, we recommend you add the following to your Git User Configuration (~/.gitconfig):
[url "git://anongit.kde.org/"] insteadOf = kde: [url "firstname.lastname@example.org:"] pushInsteadOf = kde: