After upgrading to macOS Mojave you might experience following error when trying to run some command line tools like git, for example:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
To resolve that run those commands in Terminal:
sudo xcode-select --switch /Applications/Xcode.app sudo xcode-select --switch /Library/Developer/CommandLineTools
Issue should be resolved.