$ xcode-select --install
$ sudo xcode-select --reset
$ sudo xcode-select -s /Library/Developer/CommandLineTools
Note: In case you have Xcode installed,
you may need to specify Xcode directory in this case,
it should be something like this
$ xcode-select -s /Applications/Xcode.app