$ git version
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
错误显示路径不存在,xcode-select -p 打印出来的路径也是这个,可能因为我电脑以前装过Xcode,后来卸载了路径还是之前的,重置系统默认开发工具路径就好了
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
$ sudo xcode-select -r
$ xcode-select -p
/Library/Developer/CommandLineTools
$ git version
git version 2.24.3 (Apple Git-128)