3

I've recently upgraded from Mac 10.6.8 (Snow Leopard) to 10.9.4 (Mavericks).

I had git 1.8.5.2 installed on the old system and want to update it now to the latest version. So I uninstalled git with the uninstall file, I tried to update it with Xcode but nothing works. Typing $ git --version I still get the response "git version 1.8.5.2 (Apple Git-48)"

If I try to download git from the git-scm.com page it will automatically download git 2.1.0 for Snow Leopard and if I try to download git installer I get the version for snow leopard.

Anybody got an idea how to fix this?

0

I've had a lot of luck using the homebrew package manager on OS X. Check if you have it using your terminal:

$ which brew

If no path is given, install it:

$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Afterwards, diagnose and troubleshoot any problems, then make sure brew is up to date.

$ brew doctor $ brew update

Before we install git make a note of a git that may still be being used:

$ which git

Go ahead and install git:

$ brew install git

Afterwards, open a new terminal (or tab or restart terminal) and see if we have a successful location - or a new location that matches with our fresh git install:

$ which git

If it seems to be pointing to an old location or something that does not involve /usr/local/bin (where homebrew references things) then you may need to adjust your shell path. Take a quick look at it with:

$ echo $PATH

You can review various ways to change it elsewhere. I recommend the following option, but there are other listed in the same article that may be simpler for you.

How should I set the PATH variable on my Mac so the Hombrew-installed tools are found?

  • If you use software IDEs, some of them provide plugins or have source control implementations/libraries built for things like Git, SVN, Mercurial etc. that do not require updating or reinstalling your native or default SCM software (like your OS X git). Netbeans, for example, has a plugin that uses JGit which is a a pure Java library implementing the Git version control system. Using something like the Netbeans IDE might be a potential work around for you. – jmmygoggle Dec 24 '14 at 0:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.