Upgrading to new git version on Mac OSX
Mac OSX comes with git pre-installed. You can find the installation here: /usr/bin.
To check its version, type the following:
$ git --version
To upgrade to the latest version of git, do the following:
- Download and install latest git from http://git-scm.com. This will install it in /usr/local/git folder. Make sure it did that.
- Open terminal and run the following
$ vi ~/.bash_profile
- Go to insert mode (press "i" on your keyboard)
- Paste the following
export PATH=/usr/local/git/bin:$PATH
- If there already stuff in .bash_profile file, just append "/usr/local/git/bin" appropriately. For example, in my case, the android sdk path was already set in it. So it was appended at the end as shown below:
export PATH=/Users/sukamat/android-dev/sdk/platform-tools:/Users/sukamat/android-dev/sdk/tools:/usr/local/git/bin:$PATH
- Save the file.
- Quit terminal
- Reopen terminal
- Type the following:
$ git --version
It should show the version you installed.
Categories: Technology, Troubleshoot, Tutorial
git, github, installation, mac, osx, scm, setup, upgrade
That is very attention-grabbing, You’re a very professional blogger. I have joined your rss feed and sit up for in search of extra of your fantastic post. Also, I have shared your website in my social networks!