Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to replace my git installation, but I can't even remove it.

I have found these instructions all over, but they don't work.

git version

When I run the aforementioned solution, every line gives me

No such file or directory

I tried running the installer for 1.7.7 from git-osx-installer, and it completes sucessfully, but makes no change to my git install. I have restarted the computer to see changes take effect to no avail.

share|improve this question

migrated from Nov 2 '11 at 20:11

This question came from our site for professional and enthusiast programmers.

And what does which git tell you? – Useless Nov 2 '11 at 16:38
It said /opt/local/bin/git – Kirk Strobeck Nov 2 '11 at 17:53
Here are the commands I ran – Kirk Strobeck Nov 2 '11 at 17:54
Now it says /usr/bin/git – Kirk Strobeck Nov 2 '11 at 21:06
up vote 5 down vote accepted

You get this error because git isn't installed in /usr/local/git. Find out where it is with which git, and rm it with the correct location.

If you have a package manager (brew, fink or macports) you'll want to use its interface to remove it, if it was used for installation.

EDIT after your comment

/opt/local/bin is the location of software installed by macports, so you'll want to run this:

sudo port uninstall git

Even if you have deleted by hand (which you shouldn't have, the original page is misleading), it should be fully uninstalled

share|improve this answer
Now it says /usr/bin/git – Kirk Strobeck Nov 2 '11 at 21:06

You do not need to remove the old version. Grab the source tarball, unpack it into your home directory, and build it. For example:

$ cd $HOME
$ tar zxf git-x.y.z.tar.gz
$ cd git-x.y.z
$ ./configure --prefix=$HOME
$ make && make install  # (Can probably just do "make install")

That gives you a perfectly good version installed in $HOME. Put $HOME/bin in your PATH and you are good to go.

share|improve this answer
Now it says /usr/bin/git – Kirk Strobeck Nov 2 '11 at 21:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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