Last login: Fri Nov 24 10:45:52 on ttys001
-bash: /Users/raquellorenzana/git-completion.bash: No such file or directory
-bash: /Users/raquellorenzana/git-prompt.sh: No such file or directory
-bash: __git_ps1: command not found
raquellorenzana ~ $ 
-bash: __git_ps1: command not found
raquellorenzana ~ $ 
-bash: __git_ps1: command not found
raquellorenzana ~ $ 

I have 3 failed commands appearing before/above my initial prompt on opening a new terminal screen. After typing new commands, just one of the old failed commands appears above my prompt every time. I manage to clear my terminal to just show my prompt by hitting edit > clear screen, however it's not a permanent fix. Any suggestions?

  • 1
    Welcome to Ask Ubuntu! Please edit your question and add the content of your ~/.bashrc using the formatting tools.
    – dessert
    Nov 24, 2017 at 16:16
  • 1
    copy paste your .bashrc contents by typing cat ~/.bashrc
    – himanshuxd
    Nov 24, 2017 at 16:23
  • 1
    It might come down to just a typo. /Users is the user directory on Mac. /home is the user directory on Ubuntu.
    – wjandrea
    Nov 24, 2017 at 17:18
  • @wjandrea, according to your comment I suppose this question is not about Ubuntu.
    – pa4080
    Nov 25, 2017 at 6:41
  • 1
    @pa4080 Yes, it's about Mac. I had thought OP followed the wrong tutorial or something, but I just noticed "ttys001", which is the Mac equivalent of "tty1".
    – wjandrea
    Nov 25, 2017 at 6:46

1 Answer 1


Probably you've messed up your ~/.bashrc file. The way to solve this problem is to edit this file and find which commands inside generates these messages.

The directory /etc/skel contains copies of the files that will be copied into the user's home directory when you create a new user. So you could compare your .bashrc file with the default one in this way:

diff /etc/skel/.bashrc ~/.bashrc

You could copy /etc/skel/.bashrc in your home directory, but, just in case, first create a backup of the existing file:

cp ~/.bashrc{,_old}
cp /etc/skel/.bashrc ~/

Then you could compare the two files and command by command make the necessary changes in the new file.

diff ~/.bashrc ~/.bashrc_old

I would suggest you to un-comment the following in the new ~/.bashrc: force_color_prompt=yes

To apply the new file within the current session (without start a new terminal) you should source it by one of the following commands: . ~/.bashrc or source ~/.bashrc.

Additionally you could get coloured output of diff by the wrapper colordiff. First install it:

sudo apt install colordiff

Then use it in this way (source):

diff <old file> <new file> | colordiff

Or just use:

colordiff <old file> <new file>

Not the answer you're looking for? Browse other questions tagged or ask your own question.