Issues with git on Mac

1

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?

brianhevans

Posted 2012-10-03T17:53:02.823

Reputation:

Answers

5

You stomped out your path! Change it to

 export PATH=${PATH}:/usr/local/git/bin

Matt Ball

Posted 2012-10-03T17:53:02.823

Reputation: 3 322

whoops! when I try and reopen that profile I get "command not found" How do I get back to the profile file – None – 2012-10-03T18:34:15.020

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 – None – 2012-10-03T18:43:11.623

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" – None – 2012-10-03T19:03:58.113