macOS Catalina was released on October 7, 2019. If you’re a developer and upgraded your Mac to the latest OS version, you might’ve been greeted with an error that look something like this if you use Git as your version control system,
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
The error itself provides a hint as to what you’d need to do to resolve the issue. In particular the part about the developer path /Library/Developer/CommandLineTools
. You’ll need to reinstall the command line developer tools. To do this you’ll want to run this command in Terminal,
xcode-select --install
Terminal should respond with,
xcode-select: note: install requested for command line developer tools
Afterwards a system modal will be started indicating the progress of the installed of the command line developer tools. Once this process completes, you can get back to interacting with Git without errors.