Fix "xcrun: error: invalid active developer path" after a macOS update — by onin on Ask Different
After a macOS upgrade, git and other developer tools often stop with this error because the Command Line Tools need reinstalling. Running xcode-select --install brings up an installer, and you don't need the full Xcode app.