26

Git doesn't work after upgrading Mac OS X El Capitan.

After installing El Capitan, I have this error when I'm doing a git command:

xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Cœur
  • 37,241
  • 25
  • 195
  • 267
Kevin
  • 4,823
  • 6
  • 36
  • 70

1 Answers1

59

Thanks Nafsaka for the highlight.

Here is the solution: Reinstalling Xcode Command Line Tools via Terminal

xcode-select --install
Kevin
  • 4,823
  • 6
  • 36
  • 70
  • 1
    To add to this, if you ever have the joys of installing the GH bundled git, and/or home-brew and you find git breaks too (or you find that your developer tools start randomly playing up) then revert them back. Check by ` which git | xargs spctl -v -a ` without the quotes.. If it comes back with "no usable signature: reguected", it's not Apple original – Adrian Sluyters Jan 13 '16 at 10:09
  • 4
    Thanks for posting this, it's the same when you update to Sierra – Ethan Parker Sep 22 '16 at 15:34