Where developers come to connect, share, build and be inspired.


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. Picture

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



  • Ixcwetyn

    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.

  • 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'.

  • 48a1f6c8f46a3cfebac37f0955f94b52

    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!

  • 67e5baa68c848bf1fa4d3347510a4b20

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

Add a comment