How to upgrade Git (Mac OSX)

May 8, 2016 · 1 min read

Problem : Git vulnerabilities CVE-2016–2324 and 2315
Solution : Update it :)

Check version

$ git --version

Backup (or remove) Apple git (Optional)

$ sudo mv /usr/bin/git /usr/bin/git-apple

Install Homebrew if you didn’t have

$ /usr/bin/ruby -e "$(curl -fsSL"

Or update if you already have

$ brew update && brew upgrade

Install Git with Homebrew

$ brew install git

Symbolic link

$ brew link --force git

Close Terminal and reopen then check version

$ git --version

You should see…

git version 2.8.2

Nice! We’re safe now! And next time you can just…

$ brew update && brew upgrade

Happy Gitting!

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store