-
下载git代码库:
git clone https://github.com/git/git.git
-
创建~/.git-completion.bash:
cp git/contrib/completion/git-completion.bash ~/.git-completion.bash
-
修改~/.bash_profile(没有则创建)
vim ~/.bashrc
添加如下内容:
source ~/.git-completion.bash
-
重启终端
git clone https://github.com/git/git.git
cp git/contrib/completion/git-completion.bash ~/.git-completion.bash
vim ~/.bashrc
添加如下内容:
source ~/.git-completion.bash