2

I have read this thread when I got the the git: command not found (on OS X 10.5) error

which basically said to update ~/.profile file with this phrase:

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

I did that and it didn't work. but if I just write this code in the terminal the "git" command did work - but only until I have closed the terminal - then I need to retype this code whenever I want git to work.

My suspicious is that I have another ".profile" file somewhere in my mac and that the file I have updated is irrelevant (since it didn't work).

Is that the case and if so - how do I find this file?

Community
  • 1
  • 1
Alon
  • 7,618
  • 18
  • 61
  • 99
  • 1
    Did you relaunch a new shell session, and did you typed `echo $PATH` to check the value of `$PATH` (and see if it contains `/usr/local/git/bin`)? Does `/usr/local/git/bin/git --version`works? – VonC Jul 01 '12 at 10:05
  • "/usr/local/git/bin/git --version" works - but I don't see /usr/local/git/bin in "echo $PATH" - how do I know where this $PATH is defined so I will know where to change it.. – Alon Jul 01 '12 at 10:16

1 Answers1

5

Add this line to your ~/.bash_profile file:

source ~/.profile

This excellent super user answer explains why: Difference between .bashrc and .bash_profile

Community
  • 1
  • 1
georgebrock
  • 28,393
  • 13
  • 77
  • 72