This is actual copy/paste from my shell:
machine:~ me$ brew install git
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/git-2.2.1.mountain_lion.bottle.tar.gz
######################################################################## 100.0%
==> Pouring git-2.2.1.mountain_lion.bottle.tar.gz
==> Caveats
The OS X keychain credential helper has been installed to:
/usr/local/bin/git-credential-osxkeychain
The "contrib" directory has been installed to:
/usr/local/share/git-core/contrib
Bash completion has been installed to:
/usr/local/etc/bash_completion.d
zsh completion has been installed to:
/usr/local/share/zsh/site-functions
==> Summary
🍺 /usr/local/Cellar/git/2.2.1: 1356 files, 32M
machine:~ me$
machine:~ me$ git --version
git version 1.7.10.2 (Apple Git-33)
machine:~ me$
I can close Terminal and open it again, but the same Git version is shown.
Running which git
returns /usr/bin/git
. If I move that binary to /usr/bin/git
, then run git --version
again, it returns git version 2.2.1
, but why does installing a new Git not replace the old one?