James Chevalier Stuff & Junk

20Jan/12

Using a custom version of Git on Mac OS X Lion

If you’re using git-osx-installer to install Git on Mac OS X Lion, and ‘git –version’ in Terminal isn’t displaying the version you’ve just installed, then your system is using the version of Git that’s provided by Xcode Developer Tools.

To use the git-osx-installer version that you’ve just installed, you’ll need to edit the /etc/paths file and add “/usr/local/git/bin” to the top of that file.

To open the file for editing, type sudo nano /etc/paths in Terminal.  Add the “/usr/local/git/bin” line to the top of the file.  To write the file, and exit nano after making that change, type Control-O then Control-X. To allow the change to take place, you’ll need to quit Terminal, then open it back up again.

git –version should now report the newly installed git-osx-installer version of Git.

Related posts:

  1. View the changes between two branches of a git repository in SourceTree
  2. Pick as a replacement for Digital Color Meter in Mac OS X Lion
  3. Some Fantastic Mac And iPhone Applications
  4. Make a GitHub Project Page that’s an exact mirror of your Master branch
  5. How Multi-File Search in BBEdit improved my workflow