4

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 1.7.3.2

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.

4

2 Answers 2

6

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

1
  • Now it says /usr/bin/git Nov 2, 2011 at 21:06
2

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.

1
  • Now it says /usr/bin/git Nov 2, 2011 at 21:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .