下载软件
$ git clone https://github.com/markgandolfo/git-bash-completion.git
$ cp git-bash-completion/git-completion.bash ~/.git-completion.bash
修改~/.bashrc,在文件结尾增加
bash 在每次启动时都会加载 .bashrc
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
使能
$ source ~/.bashrc