This will download the latest version of Git to your desktop/download area as a dmg file.
Open the dmg file, then Control/Right Click the git.pkg file to install.
When Git is installed check in the Terminal, launch the Terminal from /Applications/Utilities and check the version:
And the version is displayed
git version 2.5.3
To see where it is located
And the location is shown
Upgrading Git from a previous version to the latest 2.0.1
If you have previously installed Git you can upgrade to the latest version by uninstalling the previous install using the uninstall.sh file with the installation.
Go through the same process of downloading and mounting and the .dmg – then launch the Terminal.
Then just drag and drop the uninstall.sh file on a Terminal window and hit enter, follow the prompts and then install the lastest version of Git by opening and installing the Git package. Your previous Git configuration settings and working repositories remain intact.
Trumping Xcodes Older Git
If you have Xcode already installed and have installed command line tools then you alreay have Git, probably an older version which is distributed with Xcode this is installed in:
To run the lastest version you need to adjust your shell path:
You need to add add the above path to the beginning of your shell path to take precedence over the other path, the path will be set in either .bashrc or .bash_profile in your home directory.
So add in
to the path similar to the below:
Restart or reload the Terminal and the newer Git version will now be used.
Learn how to set up a Git workflow with your local OSX client and a remote webserver.