Git “Command Not Found” Error In Xcode 4.4 and Mountain Lion

Having just installed Xcode 4.4 from the MAS (Mac App Store) after upgrading to Mountain Lion yesterday, I went to do a code check in today. Much to my surprise, I got this:

-bash: git: command not found

Others seem to have gotten the same issue, but the only fix I saw was to download it through Xcode’s Downloads pane:

I thought, ok, swell, let’s do this. Unfortunately, fate was not with me. I got this:


So, I thought to myself. AHA! I’ll just go download it from the Apple Developer site. I knew it wouldnt be in the normal tools download area, so I went straight to the “Downloads for Apple Developers” section. That’s the one that gets no love and looks like its from the late 90’s. Anyway, what do I see as the 2nd item on the list? Command Line Tools for Xcode – Late July 2012. Sounds like the right thing right? Well, wrong (as I found out). That’s only for Lion.

What you need to do is go to the Xcode 4.4 area, and in that collapsible section you will find the command line tools compatible with the new Xcode and Mountain Lion.


Download that, run it, it will ask for your machine’s admin password and it will then install and you can commit to your hearts content.

Hope that helps someone.

  • Pingback: Dan Wyszynski()

  • Pingback: Anton Ignatov()

  • Bart van der Hoeven

    Thank you! I had the same problem but for me just (re)installing Command Line Tools from Xcode 4.4 did the trick.

  • DisqusYou

    you can also use “xcrun -find git” from Terminal to find the path to the “git” binary installed in your existing copy of the developer tools. Add that to your “.bash_profile” script and you’re back in business. No download required.

  • AbovegroundDan

    Great tip, thanks!

  • Pingback: Atsushi Eno()

  • Pingback: Erik A. P. Baldwin()

  • Jen Gristock