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

2. 在~/.bash_profile中加如下内容:

if [ -f ~/.git-completion.bash ]; then
  . ~/.git-completion.bash
fi

3. If this doesn't work off the bat, you may need to run chmod -X ~/.git-completion.bash to give the script permission to run.

4. Restart terminal

详细见:http://apple.stackexchange.com/questions/55875/git-auto-complete-for-branches-at-the-command-line

 

相关文章:

  • 2021-05-29
  • 2021-09-22
  • 2021-11-14
  • 2022-12-23
  • 2021-12-23
  • 2021-11-14
  • 2021-10-07
  • 2021-11-22
猜你喜欢
  • 2022-01-13
  • 2021-06-14
  • 2021-12-17
  • 2021-11-11
  • 2021-08-24
相关资源
相似解决方案