Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin 

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 stackoverflow.com Oct 5 '12 at 6:45

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

add comment

1 Answer

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
add comment

Your Answer

 
discard

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