By andy.grover on May 07, 2010
If you use git on a daily basis like I do, git-completion.bash is a great way to make your life a little easier. While I guess it does add tab-completion for git commands, the most useful feature for me is the ability to put the current branch into the cmdline prompt. Now that I am comfortable working with multiple git branches and remotes, a little reminder where I am prevents time-consuming mistakes. git-completion.bash lives in git's git tree.
- git clone git://git.kernel.org/pub/scm/git/git.git
- copy git/contrib/completion/git-completion.bash to ~/.git-completion.sh
- Follow the instructions in the file to set up, and enable showing branch in $PS1
log1 = log --pretty=oneline --abbrev-commit