macOS上使用git提示「invalid active path(Applications/Xcode.app/Contents/Developer」。明明已经安装了git。
使用VsCode git时提示没有找到git工具,建议brew install git试下,所以尝试重新安装git,结果git升级成功,但是还是提示没有安装git。
回到提示信息:「invalid active path(Applications/Xcode.app/Contents/Developer」,猛然发现,前段时间卸载了xCode,因为这玩意占用空间大,近期使用率低。而提示的这个git是用xCode的命令行工具来调用git的,所以卸载了xCode后出现找不到git。
sudo xcode-select -r sudo xcode-select --switch /Library/Developer/CommandLineTools sudo xcode-select -p
又可以愉快的git了。