(Mac) -bash: __git_ps1: command not found

后端 未结 19 1991
感动是毒
感动是毒 2020-11-30 16:20

I\'m trying to change my command promt in terminal. I keep getting the error:

-bash: __git_ps1: command not found

I\'ve tried it just by typing

19条回答
  •  Happy的楠姐
    2020-11-30 17:06

    At least with Xcode 6, you already have git-completion.bash. It's inside the Xcode app bundle.

    Just add this to your .bashrc:

    source `xcode-select -p`/usr/share/git-core/git-completion.bash
    

提交回复
热议问题