How to install a current version of git to your Ubuntu machine

As described by the linked Stackoverflow answer, run these commands:

sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git
git --version

This will get you Git 2.6.4 (as of Dec 2015).

Troubleshooting

If you don't have add-apt-repository yet, install it with:

sudo apt-get install python-software-properties software-properties-common
Dominik Schöler Over 8 years ago