Files which store the user details and branch details and some config settings like color etc.There are three config files on system:
Repository itself: /.git/config (for repo specific settings)
User home directory: ~/.gitconfig (for a particular user)(use –global to access this)
System-wide directory: $(prefix)/etc/gitconfig (for system wide settings)(use –system to access this)
Default merge/Remote tracking branch:
Under [branch “master”], try adding the following to the repo’s Git config file (.git/config):
This tells Git 2 things:
When you’re on the master branch, the default remote is origin.
When using git pull on the master branch, with no remote and branch specified, use the default remote (origin) and merge in the changes from the master branch.
If you don’t want to edit the config file by hand, you can use the command-line tool instead:
Setting push default as current:
You can set in git what you want to push when you do git push. There are many options like matching, nothing , current, upstream , simple .
If always prefer to use current. When you use current you don’t have to mention the remote branch everytime.It automatically gets mapped to the same name remote branch.Like branch name in local is branch1 then on git push it tries to push into remote branch branch1.