When running any git command — including git pull
, git push
, git status
, etc. — I was getting this error on macOS Big Sur.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
The message means the Xcode Developer Tools are not properly installed, and you need to run the following command to fix this.
xcode-select --install
A window will prompt you to Install
the Developer Tools. After two minutes, a message saying "The software was installed" showed up on my machine, a MacBook Pro (13-inch, M1, 2020). I was good to go.