How to upgrade Git to latest version on Mac OS X?

UPDATE

I strongly recommend to not use this method anymore, you should use a package manager like Homebrew to keep the Git provided by OSX untouched. Simply install your own version of Git...

brew install git

and then update your PATH to use it instead of the genuine one. Take a look at the link in Ryan's comment below, it could be helpful.

You will be able to update Git anytime through the package manager.

brew upgrade git

UPDATE 2

Finally I found this solution from Justin Hileman to update your PATH the right way :

export PATH="$(brew --prefix git)/bin:$PATH"

Add this line in your ~/.bashrc file.


http://stackoverflow.com/questions/8957862/how-to-upgrade-git-to-latest-version-on-mac-os-x


Could not symlink share/*****   /usr/local/share/**** is not writable

sudo chown -R $(whoami) /usr/local/share/

brew link git



results in: Error: Permission denied - /usr/local/lib/perl5/

sudo chown -R $USER:admin /usr/local


brew link --overwrite git


展开阅读全文

没有更多推荐了,返回首页