git tab-completion on Mac OS X when installed via homebrew

Moin Moin,

on Mac OS X you do not have tab-completion in git. You have to activate it. Recently my colleauge Enrico found a description how to do so:

http://en.newinstance.it/2010/05/23/git-autocompletion-and-enhanced-bash-prompt/

This is cool but it will not work, when you have installed git via homebrew … what I strongly recommend. Here is what you have to add to your .bash_profile in your homedirectory:

Make sure that the two files are executable (change it with chmod a+x [file]).

Cheers

Andy

Published: February 21 2013