Updating git in OSX

Recently there was a critical vulnerability in git announced affecting many git users including myself on OSX.

After downloading and installing the latest version of git and entering in Terminal

git −−version

I was presented with the incorrect version number. Checking where it had been installed with

which git

displayed the original

/usr/bin/git

instead of the newly installed version at

/usr/local/git/bin

To resolve this I added the correct path (to my bash profile)

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

and now which git correctly returned the new path and bumped the version

git version 2.0.1

Leave a Reply

Your email address will not be published. Required fields are marked *