The first thing you'll want to do is make sure your ~/.gitconfig file is up to snuff. This file holds various Git preferences such as the username and email that is used for every commit. For details on how you can customize this file, see Customizing Git Configuration. For instance, I've made sure that Araxis Merge is the diff and merge tool used by Git:
[diff] tool = araxis [difftool] prompt = false [merge] tool = araxis [mergetool] trustExitCode = true
A few Git aliases I like to use include:
[alias] ci = commit co = checkout st = status branches = branch lol = log --graph --decorate --pretty=oneline --abbrev-commit lola = log --graph --decorate --pretty=oneline --abbrev-commit --all ls = ls-files gblame = gui blame
Finally, you can show what branch you're currently working on via a Git prompt script. Like the Git completion script, you'll want to create a ~/.git-prompt.sh file at your root directory and then add it to your shell startup configuration similar to the git-completion script. For example, when working on the master branch of the Librarian project, my shell prompt looks like:
[abraginsky@darthomir Librarian (master)]$
Obviously, you can configure Git in many more ways than this. Nothing beats the main documentation and a book I recommend reading is Version Control with Git.
Hopefully you've found this helpful! Feel free to post any other Git command line tips and tricks that you like to use.
Thanks to @jarjar2k7 for some of these tips.