在mac使用git的时候报下面错误
$ git pull
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools),
missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
安装xcode,在终端执行下面的命令
$ xcode-select --install
如果这不起作用,就强制它重置。这一次您需要sudo访问权限。
$ sudo xcode-select --reset
总结原因
1.在执行命令的时候 我打开mac的关于本机,查看软件更新 果然有xcode新版本需要更新
2.所以直接通过桌面更新也是可以的
3.就是因为mac 操作系统更新了xcode才导致的出错