1 cd ~
2 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
3 brew list
4 brew install bash-completion
5 brew info bash-completion
6 open .bash_profile
7
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
8 source .bash_profile
9.https://github.com/git/git/edit/master/contrib/completion/git-completion.bash
下载以上git-completion.bash至/Documents目录下,
cp /Documents/git-completion.bash ~/.git-completion.bash
http://www.oschina.net/translate/10-tips-git-next-level?cmp