HOW TO: Use newer Git in bash instead of the old one installed by Xcode 4 ?

Xcode 4 (since 4.0.2) will install git v1.7.3.4 into “/usr/bin/” by default.

You can use it in both Xcode and bash.

But what if you want to use a new version of git in bash (Xcode 4 will still using v1.7.3.4)? It’s easy to do so.

Step1: Download and install the new version from here:

Step2: Edit your “~/.bash_profile” file (create one if doesn’t exist) and add a new line:

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

Step3: Restart the bash

That’s all.

Comments are closed.