I have MacPorts' Git at /opt/local/bin/git, while the newest Git at /opt/local/git.
My PATH command
export PATH=/usr/local/git:/opt/local/bin:/opt/local/sbin:/Users/Masi/.cabal/bin:/Users/Masi/.cabal/bin/xmonad:$PATH
The command
echo $PATH
gives me
/usr/local/git:/opt/local/bin:/opt/local/sbin:Users/Masi/.cabal/bin:/Users/Sam/.cabal/bin/xmonad:/sw/bin:/sw/sbin:$PATH:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/sbin:/usr/bin/perl::/usr/X11R6/bin
I run the following command and get MacPorts' Git
which git
/opt/local/bin/git
Aaron says
Add /opt/local/git as the first element in the path, then /opt/local/bin/. This way, your git will be found, first, and everything else from `/opt/local/bin/ will be available, too.
I did not get the newest Git to be run although I have it first in my PATH.
How can you change Git to be loaded from the second PATH?