Reality-Loop

Git Quick Tip: Bash completion

September 24, 2010 | 0 Minute Read
This post was originally posted on my old blog.

google-app-engine-groovy.png

Git comes with a script that provides tab-completion for the bash shell.

The script is called git-completion.bash and should be in your git installation directory under contrib/completion/.

On my OS X/MacPort installation of Git it is here: /opt/local/share/doc/git-core/contrib/completion/git-completion.bash

Just include this script in your bash environment with the following line added to your ~/.profile:

source /opt/local/share/doc/git-core/contrib/completion/git-completion.bash

Have fun with Git!