【发布时间】:2019-07-19 04:04:08
【问题描述】:
尝试用 homebrew 更新我的 git,我遇到了这个问题:
MBP:GitHub_Tutorial nasdas$ brew install git
Warning: git 2.21.0 is already installed and up-to-date
To reinstall 2.21.0, run `brew reinstall git`
MBP:GitHub_Tutorial nasdas$ git --version
git version 2.17.2 (Apple Git-113)
【问题讨论】:
-
运行
hash -r,然后运行which git。输出是什么? -
/usr/local/bin/git
-
更有趣的是,在运行 hash -r 之后,当我运行 git --version 时,它现在会显示正确的 git 版本