Git autocompletion is not working with homebrew Here is my setup:

brew install git bash-completion
Warning: git-2.1.3 already installed
Warning: bash-completion-1.3 already installed


In .bash_profile:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
fi


But I still don't have autocompletion for git commands. (I used macports before, but completely removed it because I couldn't get git commands to autocomplete no matter what I tried.)

I am on OSX 10.10
For Yosemite, after I upgraded to git 2.1.3 with homebrew, this worked in my .profile file (.bash_profile or similar would work, too):

# git tab completion (homebrew)
if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then
    . `brew --prefix`/etc/bash_completion.d/git-completion.bash
fi


I used to have git-prompt.sh there, but changing it to git-completion.bash worked for me.  ymmv.