I get a command not found from my bashrc

When I try and go to the .ssh directory with cd ~/.ssh it correctly navigates to that directory but I get a __git ps1: command not found. Not sure why this is happening and how to resolve the issue.

here is my bashrc file

  • How do I cd to the closest parent folder that has a .git folder with bash?
  • #Git tab completion
    source ~/git-completion.bash
    # Show branch in status line
    PS1='[\W$(__git_ps1 " (%s)")]\$ '
    export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'

  • An error occurred while installing sqlite3 (1.3.11), and Bundler cannot continue
  • Android Studio cant start git, although actually can
  • How can I know how much percentage of git push is complete?
  • What's the best practice for putting multiple projects in a git repository?
  • How to debug Cannot run program “C:\Program Files\Git” in a Jenkins job?
  • Composer install/update not working
  • One Solution collect form web for “I get a command not found from my bashrc”

    The problem is that your prompt contains the __git_ps1 function call, but it isn’t defined. Newer versions of the git-completion file define this function but it’s not in your copy. EG, on Fedora, its defined in /etc/bash_completion.d/git

    Git Baby is a git and github fan, let's start git clone.