I have installed GIT 1.7.7.1 via homebrew and had to do a
sudo brew link git
to link git to
/usr/local/bin
When I run git --version in terminal I get an older version of Git (1.7.5.6)
Is it possible to link to the new version instead?
I have installed GIT 1.7.7.1 via homebrew and had to do a
sudo brew link git
to link git to
/usr/local/bin
When I run git --version in terminal I get an older version of Git (1.7.5.6)
Is it possible to link to the new version instead?
Looks like /usr/bin
go before /usr/local/bin
in $PATH
and hence take precedence. I suggest to change order of paths in $PATH
.
(Also you may try to define alias: alias git=/usr/local/bin/git
)
Here is another solution that worked for me.
I found this related post to be very helpful. Instead of changing the $PATH variable, it just has you simply edit your /etc/paths file. https://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are/533708#533708
Here's what mine looks like after I did that:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
Credit to @jrwren & @jthomas over at StackOverflow for their answers.