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.