如何在 MacOS Sierra 更新后修复 git 路径?

How to fix git path after MacOS Sierra update?

我刚刚从 OS X 10.11 "El Capitan" 升级到 10.12:"Sierra",当我打开 intellijIdea 时,出现以下错误:

无法开始Git:/usr/bin/git Git 可执行文件的路径可能无效。

我的问题在 运行 xcode 安装后从终端使用以下代码解决:

xcode-select --install

打开xcode然后xcode会要求你接受新的协议按接受然后问题就解决了

在最近的 MacOS 更新中,git 路径是:

/usr/local/Cellar/git/2.16.2/bin/git

而不是 2.16.2 选择您的版本