1. curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash 2. 在~/.bash_profile中加如下内容: if [ -f ~/.git-completion.bash ]; then . ~/.git-completion.bash fi 3. If this doesn't work off the ba…