How to change the $PATH in Mac OSX
- by Samuel Elgozi
I've installed git via the instaler and not with terminal with commands, and my $PATH changed, the path to the 'local' git was added the the end of the variable, and my $PATH changed to this:
/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
However, that doesnt help me, because i the path to Xcode's git comes first.
so what I've done is the next, I added this lines to my '.bash_profile':
export PATH="/usr/local/git/bin:$PATH"
and now my path is the next:
/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin
And I wanted to know how to remove the duplication from the end of the Path so I end up with:
/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Thanks Ahead! And sorry if my english is too bad..