git on Mountain Lion

Do you have problems with git since you got your new shiny kitty on your machine?
Well, there's a fix for that. You just need Xcode (from the Mac App Store) and an Apple ID assigned to a dev Account (which you probably have as an iOS Dev).


First, install Xcode (Mac Appstore version).

Then, launch Xcode and Navigate to the Settings panel. Do this by clicking Xcode > Preferences or Cmd + ,

Click on Downloads and then on Components. You should see Command Line Tools. Hit install to start the download. You may be prompted to enter your Apple ID if you never did that before in Xcode.

When the download is finished, open a terminal window and you're done. Git works again!


Sign in or sign up to add your response.

4 Responses


You actually don't need a Developer account to do this. I'm not registered as a developer with Apple, but I always make sure to install the Command Line tools before doing anything in the command line on a new computer.

over 1 year ago ·

Actually, if you don't want to install the XCode stuff, you can install homebrew (http://mxcl.github.com/homebrew/). After that it is just 'brew install git' and you're all set. As a bonus, you even get the latest version of git!

over 1 year ago ·

Thanks! Nothing like a friendly tip when setting up a new computer!

over 1 year ago ·
Photo on 9 12 12 at 6.32 pm  2

You actually don't need to install the command line utilities to get git, just XCode by itself. Git is included with XCode by default. Installing the command line tools installs a separate independent package of tools, which are great if you need all of them. If you don't want all the extra stuff that gets installed with the command line tools, you can use 'xcrun git' from the command line, or to make that even easier, make an alias: alias git 'xcrun git'.

over 1 year ago ·