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
wget https://raw.github.com/git/git/master/contrib/completion/git-completion.bash && source git-completion.bash
, no luck yet. – qed Nov 04 '14 at 21:00. ~/.git-completion.bash
directly in the shell does not work. No error message either. – qed Apr 04 '16 at 12:08curl -L https://raw.github.com/git/git/master/contrib/completion/git-completion.bash > .git-completion.bash
– gRizzlyGR Aug 14 '23 at 07:37