Installing Git on Mac OS X Snow Leapord
Git is an amazing source control system, and is even better when used with GitHub.com. Installing git on Mac is pretty simple.
First, download the latest version from git-scm.com. Extract the contents of the archive and open terminal to the new folder.
Note: Since this requires compiling, you must have the developer tools installed. Download and install the Xcode package from Apple.
$ ./configure --prefix=/opt/git
$ make
$ sudo make install
Now that it’s installed, you need to make sure it’s in your path. Add the following content your bash profile:
$ vi ~/.bash_profile
export PATH=${PATH}:/opt/git/bin
Restart terminal and you should see the manual for git when you run the git command.