Macos – -bash: __git_ps1: command not found

.bash-profilemacosterminal

I recently uninstalled Homebrew and Cellar (web dev applications), and this error now appears after every Terminal command (although I can't confirm that these are the culprits!):

-bash: __git_ps1: command not found.

I reinstalled both applications yet the error message still happens! I'm attaching my Bash file just incase it's related – PasteBin

Best Answer

You probably want to look in your ~/.bash_prompt file, or whatever file is setting PS1 (the shell prompt format) for you. Your PS1 variable is referencing the Git prompt function, which I assume got uninstalled or something. You'll want to remove the $(__git_ps1 " (%s)") part from your PS1 value.

Related Question