Open the dmg file, then Control/Right Click the git.pkg file to install.
After the installation, check your version of git in the Terminal. Launch the Terminal from /Applications/Utilities then type in the following line:
You will now see the version on your terminal. To check the file location of your installation, type in the following code:
This is what your location would look like:
Upgrading from a previous version of git to the latest 2.0.1
If you have already installed Git your system, 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.
Just drag and drop the uninstall.sh file to the Terminal window then hit enter, follow the prompts and then install the latest version of Git by opening and installing the Git package.
[st_box title=”NOTE” type=”warning”]Your previous Git configuration settings and working repositories will remain intact.[/st_box]
Upgrading latest version of Git in Xcode
If you have already installed Xcode with command line tools, then you already have Git. However, it would probably an older version which is distributed with Xcode and can be found on:
To run the latest version, follow the initial instructions here:
You need to add this latter path to 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.