Question: I just upgraded from Yosemite to El Capitan (and replicated the problem upgrading from El Capitan to Sierra), and when I try to type for example `git status` inside a terminal, I get the following error:

```
xcrun: error: invalid active developer path
 (/Library/Developer/CommandLineTools), missing xcrun at:
 /Library/Developer/CommandLineTools/usr/bin/xcrun

```

I don't have Xcode installed, never did. 
Anyone have a solution?

Answer: 
For me, after I've removed Xcode, I have to switch active developer path as follows:
`sudo xcode-select -s /`
I upgraded mac os to macOS High Sierra - 10.13.3 and faced a similar issue while trying to install watchman (with command - brew install watchman).

ran the command: xcode-select --install, then ran "brew install watchman" - Everything works fine!