Mac平台git出现xcrun: error: invalid active developer path

今天在mac上操作git,出现的一个问题,记录下来:

$ git checkout -f
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解决方式:

$ xcode-select --install
xcode-select: note: install requested for command line developer tools
$ git checkout -f
Your branch is up-to-date with 'origin/master'.

问题已解决。

猜你喜欢

转载自blog.csdn.net/zhangxu1024/article/details/78542896