I have tried the examples found here to get Git auto-completion working on El Capitan, however none of the examples work for me.
I installed bash-completion with Homebrew (brew install bash-completion).
This is my ~/.bash_profile currently (as you can see, i've tried a few things):
CRMPiccosMacBook:etc crmpicco$ cat ~/.bash_profile alias ll='ls -lG' alias composer="php /usr/local/bin/composer.phar" #if [ -f $(brew --prefix)/etc/bash_completion ]; then # . $(brew --prefix)/etc/bash_completion #fi if [ -f `brew --prefix`/etc/bash_completion.d/git-completion.bash ]; then . `brew --prefix`/etc/bash_completion.d/git-completion.bash fi #source /usr/local/git/contrib/completion/git-completion.bash #GIT_PS1_SHOWDIRTYSTATE=true #export PS1='[\u@mbp \w$(__git_ps1)]\$ ' So, if I go into my directory with the cloned Git repo and type git checkout m and hit [TAB] I get nothing (when expecting master to be pre-filled).
When I run a source on it, it doesn't exist - however it's installed.
CRMPiccos-MacBook:signup crmpicco$ brew install bash-completion Warning: bash-completion-1.3_1 already installed CRMPiccos-MacBook:signup crmpicco$ source /etc/bash_completion.d/git-completion.bash -bash: /etc/bash_completion.d/git-completion.bash: No such file or directory