- Reinstall the Command Line Tools
xcode-select --installA window pops up. Click Install and wait a few minutes.
- If it says they're already installed, reset the pathNeeds sudo
sudo xcode-select --reset
Check it worked
- Check Git works again
git --version
This error only happens on macOS.
This error only happens on macOS.