Some useful git setup commands
Linux
IT
Following are some useful git setup commands.
Set up a global username to be used for all commits.
git config --global user.name [your username]
Set up a global email to be used for all commits. Note that GitHub can associate multiple emails to your account. GitHub can aggregate statistics regarding your commits if you verify your email(s).
git config --global user.email [your email]
Set all branches to automatically rebase instead of merge. This produces a cleaner commit tree.
This doesn't mean you must always rebase; it's just the way to go unless you have a good reason not to.
git config --global branch.autosetuprebase always
Ensure that all new branches are set up to track its upstream branch.
git config --global branch.autosetupmerge true
Prevents Git from pushing changes in all matching local branches. It will only push changes in the branch you are currently in.
git config --global push.default current
Tell Git to not treat a file as having been modified if the only change is file mode executable bit. Useful for working on FAT/Windows systems.
git config --global core.filemode false
Improves git status performance considerably on Windows 7 x64
git config --global core.preloadindex true