天天看點

[原創]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,即可。