Installing Git For Command Line on Mac OS X

For The TL;DR version, you can download Git For OS X in its Google Code Repository.

When sharing my WordPress Developer Toolbox, I mentioned that GitBox is my Git client of choice. As with most software that offers a command line variant, I occasionally end up using a Terminal session to manage some of my Git repositories.

Depending on what other applications you have installed on your system, you may not actually have command line access to Git. If that’s the case and you’d rather not install the full Xcode development suite (because it¬†does include the command line utility), there is an alternative.

Install Git on Mac OS X

1. Download Git OS X Installer

The Git OS X Installer is an open source project hosted on Google Code that makes it incredibly easy to install Git without interfering with any of your front end applications and without needing to install larger development tools.

All of the versions are accessible via the downloads page and all mention Snow Leopard, but are compatible with all Intel processors. Note that the latest version is at the top of the list.

The most recent version at the time of this post is 1.8.0 and fully works with Mountain Lion.

2. Install Git on Mac OS X

The Git OS X Installer is a typical OS X setup program, so simply walk through the steps that the installer provides.

Note that since the files are being installed in /usr/local you will need root access – that is, you’ll need to enter the administrator’s password during the setup procedure.

Once setup is completed, you should be good to go.

3. Test The Installation

Once the installation is complete, you’ll need to close all active Terminal sessions. Open a new session and issue the git command.¬†Permitting all is well, you should see a screen similar to what’s above.

And that’s it. Easy enough, right?

Now you can continue to use whatever front end application you like while also being able to issue commands from the command line.

9 Comments

Simple and to the point. Git installed in 2 minutes flat, thanks Tom!

Git makes it difficult for OSX 10.6.8 users. Thanks for this guide and tim for the installer.

Just tried the latest one

git-1.9.2-intel-universal-snow-leopard.dmg 2014-04-23 10.7 MB

on osx 10.6.8 intel

But it just gives me segmentation fault.

Then I tried an older one

git-1.8.4.2-intel-universal-snow-leopard.dmg 19.1 MB

and this seems to work on OSX10.6.8

Trackbacks and Pingbacks

[...] And, of course, if you find yourself needing to issue some commands from the command line, it’s really easy to install git for the command line. [...]

Leave a Reply

Name and email address are required. Your email address will not be published.

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>