I'm trying to update to the newest version of Git on Mac OSX Lion 10.7.5. I've downloaded the newest version from here: http://sourceforge.net/projects/git-osx-installer/ multiple times. I've started and restarted terminal, and no matter what "git --version" returns "1.7.9.6" even though the newest version is 1.8.5.2. "which git" returns "/usr/bin/git". Is it being installed in the wrong spot? If so, how can I specify it to install somewhere else?
1 Answer
The OSX installer puts everything into /usr/local/git, so you need to make sure /usr/local/git/bin is on your path.
You may want to look at this answer as well. It has some more details about installing properly on OSX.
2 Comments
Anthony Myers
Yeah, I'm still very new to this, so I'm trying to figure out how to change the path. I will head over to this link now.
Anthony Myers
Thank you guys. I was looking for exactly what order my path needed to be in. I opened my bash profile, and added: PATH=/usr/local/git/bin:$PATH to it. Then reinstalled latest version of Git. Opened a new Terminal window, and now we are good to go!
/usr/bin/git --version, and thenecho $PATHm and provide the outputwhich gitit should return with -/usr/local/git/bin/git. If the path is different and not in/usryou have a local install of git and that should be removed from$PATH