Issues with Git Path (git command not found)

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:

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

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:

cd ~/

Then I created my profile since it didn’t seem to be there:

touch .bash_profile

Then I opened it using text edit:

open -e .bash_profile

In the file I added the following line:

export PATH=/usr/local/git/bin

I then restarted Terminal and once I found my development directory and ran a git status, all was well.