I recently had to replace the hard drive on my MacBook, and the backup/restore process from my Time Machine went flawlessly. Except for one thing: the first time I went to work on one of my projects, I received a “git: command not found” message when running “git status” in my project directory. Git was installed, so I knew there had to be some configuration issue. After a little searching, it seemed like my path was incorrect.
On my machine, git is installed in /usr/local/git/
In terminal, I found that running: echo $PATH returned:
This didn’t look right. After some reading, it realized I needed to make some changes to my profile to update the PATH for git. To do this, I made sure I was in my root directory:
Then I created my profile since it didn’t seem to be there:
Then I opened it using text edit:
open -e .bash_profile
In the file I added the following line:
I then restarted Terminal and once I found my development directory and ran a git status, all was well.