13

Having just installed OS X 10.11 last night, I was surprised to see that my Bash terminal did the following:

$ git
xcode-select: note: no developer tools were found at '/Applications/Xcode.app', requesting install. Choose an option in the dialog to download the command line developer tools.

Previous version of XCode did not transfer to the new OS. I tried a fresh install of Git, but still had the same XCode failure in Bash.

Is there good reason for this?

Alex
  • 263
  • 2
  • 8
  • When that command-line message happens, you should also see a GUI dialog offering to install the latest version of the Xcode command-line tools. Did that not happen? – Spiff Oct 01 '15 at 14:52
  • Yeah once I installed XCode it worked... I was more wondering why git now has a dependency on the Apple Dev Tools...? – Alex Oct 01 '15 at 15:23

2 Answers2

21

For me, this was a solution:

xcode-select --install

After the installation, git started to work again.

Michal
  • 326
  • 2
  • 6
  • Good call thanks. Will mark as correct although I installed XCode and this fixed it too. – Alex Oct 02 '15 at 08:05
  • Thanks :) This is my first answer on StackExchange, so it will help me to earn reputation. – Michal Oct 02 '15 at 08:36
1

Faced this after upgrading to El-Capitan

xcode-select --install 

didn't work for me even after 'Finding Software' and Downloading. I don't have Xcode.app installed (Didn't want to install it) so i fixed it by downloading Command Line Tools from https://developer.apple.com/downloads/ (requires Apple SignIn) and installed it manually.

After installation i was able to run git commands again

William M
  • 111
  • 2
  • I believe that the command `xcode-select --install` does exactly the same thing - install the Command Line Tools. You can read this in the command's help: `xcode-select --help`. I think it does not require Xcode.app to be installed. – Michal Jan 14 '16 at 13:24