(1.)下载git-completion.bash文件到/root家目录
vim ~/.git-completion.bash 内容见: https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
(2.)配置生效
vi ~/.bashrc source ~/.git-completion.bash # 末尾加