
You need to install Homebrew if you don't allready have it. It's a package manager for OS X like you can find in Linux.
http://mxcl.github.com/homebrew/
1. Install git and bash-completion:
brew install git bash-completion
2. Add bash-completion to your .bash_profile
# Set git autocompletion and PS1 integration
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
GIT_PS1_SHOWDIRTYSTATE=true
PS1='\[\033[39m\]\u@\h\[\033[00m\]:\[\033[39m\]\w\[\033[31m\]$(__git_ps1)\[\033[00m\]\$ '
To test it directly you can write:
source .bash_profile
Now you should be able to use tab completion.