Monday, September 15, 2014

GIT: installation on Mac

General GIT installation page:


Mac Specific:

Install Brew - Mac package installer

This "brew" tool will be useful for many other things...

$ ruby -e "$(curl -fsSL"

Check existing version of git

$ git --version
git version (Apple Git-48)

We can see that I had not the newest GIT (1.8.5), but I want to latest and greatest...

Install the latest and greatest git version

$ brew install git
/usr/local/Cellar/git/1.9.0: 1322 files, 30M

At this point the new GIT is installed, however the old GIT is still being used..

$ git --version
git version (Apple Git-48)

Checking the NEW GIT at different location...

uki@ bin $ /usr/local/Cellar/git/1.9.0/bin/git --version
git version 1.9.0

Edit the PATH so he new GIT tool is found first

Open Applications > Utilities >
We will be editing .profile file located in your home folder (~), this file may not be showing in your Finder, so you might need to do it in vi editor.

edit ~/.profile
export GIT_TOOL=/usr/local/Cellar/git/1.9.0/
export PATH=${GIT_TOOL}/bin:${PATH}
$ git --version
git version 1.9.0