升级Mojave使用git问题

将MacOS升级到Mojave版本后,使用git工具时,出现如下错误提示:

guochongxindeMacBook-Pro:study guochongxin$ git status .
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

解决方法:

执行xcode-select --install命令,因为git附加了Xcode的命令。

参考资料:
https://my.oschina.net/gooiem/blog/2208380
http://www.cnblogs.com/snifferhu/p/6196687.html
https://stackoverflow.com/questions/32896524/invalid-active-developer-path-error-after-upgrading-to-el-capitan

你可能感兴趣的:(升级Mojave使用git问题)