How to upgrade Git on Ubuntu Hardy?

I used the PPA for Ubuntu Git Maintainers to update Git from 1.5.4.3 on Hardy to 1.6.5.2. No compiling, just add another entry to your sources list, apt-get update and you're good to go.

https://launchpad.net/~git-core/+archive/ppa

More info on the page (Technical details > Read about installing).

Or just run:

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

To update git to newer version in ubuntu

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

i am using ubuntu 10.04.2 Lucid


This tutorial worked great for me. Here's what you should do:

Download the newest version from the Git website to your home directory and extract it.

Open up the terminal and enter the following commands (one at a time):

sudo apt-get remove git git-svn
sudo apt-get build-dep git-core
cd git-1.6.5/ (or whatever version you downloaded and extracted)
./configure
make
sudo make install

You should now have the newest version of Git installed.


$ sudo apt-get update
$ sudo apt-get install git-core

Which ubuntu are you on? Hardy is still on version 1.5.4.3 for example. You may be able to install the version from one of the newer releases of ubuntu though