Yesterday I updated my macOS to latest Catalina version. After updating it GIT was not working. That always happens to me :-).
I was getting following error.
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
Many of you might also get this error. So the solution is pretty simple. Just follow a couple of steps and solve the problem.
Step 1: Open Terminal and run following command
Step 2: After this command, there will be a prompt to update the software. So update that.
And wait for the software to be updated.