WARNING: this script is deprecated, please see git-completion.zsh WARNING: this script is deprecated, please see git-completion.zsh git git

WARNING: this script is deprecated, please see git-completion.zsh


Might seems silly, but make sure that you source your ~/.zshrc file (create one if it does not exists). On OSX I completely forgot that I had switched to zsh, and got the error you mentioned because I was doing source ~/.bashrc

  1. The easiest way to get auto-completion working is to install it through Homebrew (it will work for zsh as well as bash.):
brew install bash-completion
  1. Put this into your ~/.zshrc:
# auto-completionif [ -f /opt/local/etc/profile.d/bash_completion.sh ]; then  . /opt/local/etc/profile.d/bash_completion.shfi
  1. Save the file and do a source ~/.zshrc and you will be good


For me, I simply had copied over the contents of ~/.bash_profile to ~/.zprofilewhen migrating to zsh. I simply removed this line which was the root cause of the warning message:

source ~/.profile


Type this in your console:

curl https://github.com/git/git/raw/master/contrib/completion/git-completion.zsh -OL

Add this in one of your .profile / .bashrc / .zshrc:

source ~/git-completion.zsh