Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save aduzsardi/a4903e2f54aeef044a613abe1960499c to your computer and use it in GitHub Desktop.
Save aduzsardi/a4903e2f54aeef044a613abe1960499c to your computer and use it in GitHub Desktop.
__git_ps1 command not found issue.

I've been having an issue with the following error appear in the prompt after upgrading to Yosemite. The solution was to source the git bash completion and prompt files from a local copy.

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

Then in:

    vi ~/bash_profile

Add:

    source ~/.git-completion.bash
    source ~/.git-prompt.sh

Reload terminal and you should be good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment