Every major operating system upgrade is a grand adventure. No matter the vendor or how vanilla you keep your system: stuff is going to break. This was very much the case with git when I upgraded my MacBook Pro to High Sierra.
After the upgrade I tried to pull down a git branch and received the following cryptic error:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Every OS upgrade is interesting in its own ways but you can bet your life that something relating to Xcode will go wrong. I tried using Homebrew to install git by itself (
brew install git) but that didn’t ensure git worked properly so I went with a fix that’s worked in the past:
The command above restored git and I was able to instantly get back to work. The mystery of how Xcode and its developer tools getting ruined with every install is really something Apple should address. In any event, keep this blog post handy each time you upgrade your Mac operating system!
Rojenx is a leading concept artist who work appears in games and publications
Check out his personal gallery here