Monday, April 23, 2012

git Configuration

I have not used git for my source code repository on my Mac. Today, I realized that git is not available in my Terminal. Actually, after googling, I found that git is in my Mac, but not in my PATH.

The git sits in my /usr/local/git folder.  The binary tool is at bin there. So I need to add git to my PATH. This can be done by vim editor:

vim ~/.profile

Add or update the following line:

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

Save the change and exit VIM.

Run the following command to load the path from .profile:

source ~/.profile

Now the git is available in Terminal!