My MacBook Pro got updated to MacOS Monterey (12.2.1) and since then, I can’t use git at all. When I run git I get this

USDETMNBSJEMD6R:~ iSupport$ git
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

So in reading about others having this issue they just run

USDETMNBSJEMD6R:~ iSupport$ xcode-select --install
xcode-select: note: install requested for command line developer tools

This popped open a window showing the install (which isn’t a fast install at all)

xtools_install_window.png

Eventually it will give you a pop up like the one shown below that states the software is installed.

xtools_install_done.png

For my own sanity I just check version to see if the command git will work now and it does

USDETMNBSJEMD6R:~ iSupport$ git --version
git version 2.30.1 (Apple Git-130)