Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 installed the command line interface from GitHub's site. I created a new folder to pull files down to and tried to initialize my folder by issuing the command git init but I get command not found. Next I ran echo $PATH and I got:


so I created a profile by issuing the command

$ touch .bash_profile

and then I edited the profile

$ open -e .bash_profile.

Finally I exported a new path so git could be found

$ export PATH=/usr/local/git/bin

Finally when I run echo $PATH I get /usr/local/git/bin but I still get the same error as before when I try to initialize my directory and now basic commands like 'ls' don't work.

How can I fix this?

share|improve this question

migrated from Oct 5 '12 at 6:45

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

You stomped out your path! Change it to

 export PATH=${PATH}:/usr/local/git/bin
share|improve this answer
whoops! when I try and reopen that profile I get "command not found" How do I get back to the profile file – brianhevans Oct 3 '12 at 18:34
I am able to see the results of echo $PATH but I get command not found when I try to issue command open -e .bash_profile – brianhevans Oct 3 '12 at 18:43
Ok, I ran this and things seem to be back to normal. export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin" – brianhevans Oct 3 '12 at 19:03

You must log in to answer this question.