- Download the latest version of Git from the Git Project Home
- If there is no specific version for Lion, the version for Snow Leopard works just fine.
- Open the .dmg file you downloaded
- Run the package
- Restart your computer
Nice and simple. But not complete.
May I suggest: Step 4 isn’t necessary I believe.
After step 3 we should look into to see our git:
3)
/usr/local/git
Also,
4)
you’ll need to either add it to your $PATH or make a symlink placing the binary inside a directory that is in your existing PATH.
A common practice is to make /usr/local/bin if it doesn’t exist and add a link:
sudo -s
mkdir -p /usr/local/bin
ln -s /usr/local/git/bin/git /usr/local/bin/git
exit
5)
then, restart the terminal.
We can now type git from our command line.
Fuente: DevinBaldwin