Git自动补全

2016-01-18  本文已影响92人  刘是丑

版权声明:本文为博主原创文章,未经博主允许不得转载。

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

1 cp git-completion.bash ~/.git-completion.bash (第二种方式下载.bash时使用)
2 vim ~/.bash_profile
3 source ~/.git-completion.bash
4 . ~/.bash_profile

最后,重新退出终端再打开,当你使用git [tab][tab]就可以发现已经能够自动补全啦~

上一篇 下一篇

猜你喜欢

热点阅读