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

30

git on Mountain Lion

7947 views

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

Picture

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!

Picture

Comments

  • Ixcwetyn
    alexlafroscia

    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
    jordanbondo

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

  • Blank-mugshot
    jvorhauer

    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!

  • Blank-mugshot
    leanderlindahl

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

Add a comment