天天看点

[原创]mac下的git命令自动补全[原创]mac下的git命令自动补全

[原创]mac下的git命令自动补全

无需brew安装

1、把 https://github.com/git/git/blob/master/contrib/completion/git-completion.bash 这个文件的内容,复制下来,写到本地文件中。如 ~/git-completion.bash。

2、在 ~/.bash_profile 中加入命令

source ~/git-completion.bash

3、执行 source ~/.bash_profile,即可。