mac下卸載了xcode缎除,使用git等命令時(shí)就提示錯(cuò)誤。invalid active path(Applications/Xcode.app/Contents/Developer),這種情況可以通過xcode-select --switch指定一個(gè)xcode安裝路徑梢为,如果不想安裝xcode,那么可以通過重置系統(tǒng)默認(rèn)開發(fā)工具路徑.
可以通過xcode-select命令來重置系統(tǒng)默認(rèn)的CommandLineTools路徑轰坊,如下
解決方案:
sudo xcode-select -r
xcode-select --switch /Library/Developer/CommandLineTools
xcode-select -p