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
Please not that, if you haven't installed git through Xcode or home-brew, you'll likely find the bash scripts haysclarks refers to in /Library/Developer/CommandLineTools/
, and not in /Applications/Xcode.app/Contents/Developer/
, thus making the lines to include within .bashrc the following:
if [ -f /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash ]; then
. /Library/Developer/CommandLineTools/usr/share/git-core/git-completion.bash
fi
source /Library/Developer/CommandLineTools/usr/share/git-core/git-prompt.sh
You'll need those lines if you wish to use git-prompt as well. [1]: https://stackoverflow.com/a/20211241/4795986