问题
When I installed Git with Homebrew it shows as version 1.8.5.2 but on the website the download is for 2.0.1.
Why is Homebrew installing a different version of Git?
回答1:
Make sure the pre-installed git path (/usr/bin/git) isn't before the one installed by brew (/usr/local/bin/git).
Check if /usr/local/bin/git --version returns the expected version.
Or /usr/local/git/bin/git --version.
See more at:
- "Homebrew installation of git won't take precedence over system version (in /usr/bin/)"
- "How to properly update git on mac?"
"Which Git? How to Keep Git Up To Date on Mac"
export PATH=/usr/local/bin:$PATH brew install git brew upgrade git
来源:https://stackoverflow.com/questions/24968761/why-is-the-git-version-i-install-with-homebrew-different-from-the-version-on-the