Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I think I've messed something up. When I try the following commands I always get “: No such file or directory“.

$ git stash list
: No such file or directory
$ git log
: No such file or directory
$ git diff
: No such file or directory

I tried reinstalling git and updated to mountain lion, searched in my .bash_profile and .bashrc, but nothing changed.

I hope you can help me fix it.

There is another problem. I don't know if this is related. For each blank line in my .bash_profile I get a : command not found. I commented them out and was fine.

share|improve this question
up vote 2 down vote accepted

The problem with your .bash_profile may well be related in case it contains e.g. something to manipulate your command prompt. It would get executed every time you type a command, regardless of the command.

What does "type git" give you? It should tell you the location of the git command. Does it do this for any commands other than git? What happens when you rename your .bash_profile to e.g. _bash_profile (effectively removing it). Do be sure you restart your terminal, it will only read the file on startup.

share|improve this answer
With your hint I found this little pice of code: export PAGER="less". I removed it and now everything works fine. Except from the new line problem, but this seems to be another problem. Thank you. – Carsten Griesheimer Nov 15 '12 at 17:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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