Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
3  
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 see.weareinto.com/BUGS –  Kirk Strobeck Nov 2 '11 at 17:54
    
Now it says /usr/bin/git –  Kirk Strobeck Nov 2 '11 at 21:06
add comment

migrated from stackoverflow.com Nov 2 '11 at 20:11

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

2 Answers

up vote 3 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
add comment

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
add comment

Your Answer

 
discard

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.