Git stores its configuration in two places: a global configuration file and a config file inside a repository. On Linux systems, the global file is located at ~/.gitconfig and inside of a repository the config file is at .git/config .When first setting up git, you should set your name and email address. It is suggested that you do this globally so that all projects you create and clone won't need to be individually configured. Run these commands: git config --global user.name "Firstname Lastname" git config --global user.email "you@example.com" autosetupmerge option so that when you work on branches, you will not need to specify the --track option when we pull and push. This also avoids the need to manually merge remote tracking branches with fetch and then merge. Also, you might need to specify the second setting so you can push back to origin correctly.git config --global branch.autosetupmerge true git config --global push.default matching ~/.gitconfig file and add these lines. If you look closely at that file, you'll see what the "git config --global " commands changed.[color] ui = true branch = auto interactive = auto diff = auto status = auto [color "branch"] current = yellow reverse local = yellow remote = green [color "diff"] meta = yellow bold frag = magenta bold old = red bold new = green bold [color "status"] added = yellow changed = green untracked = cyan
For more configuration options, perhaps take a peek at understanding aliases. |
Git >