I'd like to use the latest version Git via macports instead of Apple Git. But when I type
I assume that you have xCode and macports installed and properly working. In order to use macports
git first you have to install it:
sudo port install git
And then add this line to your to
.profile file in your home directory:
Something like this
echo "export PATH=/opt/local/bin:/opt/local/sbin:$PATH" >> $HOME/.profile" should do it.
As a last step you must
.bash_profile for these changes to take effect like this:
To summarize, open the terminal on MacOSX and type:
$ sudo port install git $ echo "export PATH=/opt/local/bin:/opt/local/sbin:$PATH" >> $HOME/.profile $ source .profile $ which git /opt/local/bin/git
Every time you load the shell the MacPorts path should be available. In case this doesn't work, try using
.bashrc to save the environment $PATH variable.