我在 MacBook Pro 上使用 git 已经很多年了,也安装了 xcode,但很少使用它。昨天不小心打开了xcode,立马关掉了。然后,我的 docker 环境中的 git 命令停止工作(git 无法检测到该目录是 git repo),所以我回到常规环境并输入 git status,并看到以下消息
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.
Press the 'return' key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/en.lproj/License.rtf'
Run Code Online (Sandbox Code Playgroud)
如果我运行which git输出是/usr/bin/git- 这可能是 xcode 安装的 git 版本吗?发生了什么?如何恢复原来的 git 安装?谢谢
Chi*_*rge 31
昨天更新 Xcode 后我遇到了同样的问题。在终端中运行以下命令解决了问题。
sudo xcode-select -switch /Library/Developer/CommandLineTools
Run Code Online (Sandbox Code Playgroud)
来源: https: //developer.apple.com/forums/thread/666584
| 归档时间: |
|
| 查看次数: |
2387 次 |
| 最近记录: |