Copy this code and paste it into Terminal.
This also should work for any *NIX.
There are the easiest ways to add bash completion for git.
For Mac OS X
Install git via MacPorts:
sudo port install git-core +bash_completion
Then add the following lines at the end of your
if [ -f /opt/local/etc/bash_completion ]; then . /opt/local/etc/bash_completion fi
sudo aptitude install git-completion
sudo smart install bash-completion