After upgrading to Mac OSX High Sierra I found
git and other command line tools were broken. I received the following error when trying to execute
git on the command line:
$ git xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Looks like the command line developer tools are either missing or require reinstall after the OS upgrade. You can request automatic installation of the command line developer tools with this command:
You should see the following dialog which you need to accept:
Once the user agreement is accepted and the installation is completed the issue should be resolved.