I have Git version installed, but I think this must be an old version. I'm running Ubuntu Hardy 8.04. I need to install at least version 1.6 to get a Git GUI to work. How do I upgrade my installation?

Update: I managed to upgrade my installation of Git, but I also realized that my version of Ubuntu was old so I upgraded to the newest version, which automatically gave me access to newer packages (including Git).

10 Answers 10


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


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
| improve this answer | |
  • What is the point of the python-software-properties install? – James McMahon Oct 26 '12 at 17:39
  • Quite honestly, I don't know anymore since this answer is 3 years old... probably the package is needed to install git. You can try installing without it, if it's needed, apt-get will complain. – Manuel Meurer Oct 28 '12 at 20:11
  • I thought add-apt-repository was introduced in karmic (9.10) help.ubuntu.com/community/Repositories/CommandLine – rakslice Nov 16 '12 at 4:03
  • I do not know how you managed to use add-apt-repository on hardy, but it didn't work on my 8.04 server even after a complete update. So I am publishing my own instructions, just in case someone found the same problem. – Fran Marzoa Mar 7 '13 at 16:45
  • See my comment on your answer for a tip on how to get add-apt-repository working. – Manuel Meurer Mar 8 '13 at 9:50

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

| improve this answer | |
  • Awesome, this should be the merged with the correct answer (IMHO) because it uses the distribution tools that are in place for exactly this purpose. – vdboor May 10 '12 at 14:00
  • 4
    Might need to sudo apt-get install python-software-properties first if add-apt-repository doesn't work. – Leopd Jul 30 '12 at 22:54

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)
sudo make install

You should now have the newest version of Git installed.

| improve this answer | |
  • 2
    ..and it's installed bypassing the packet management, so you are on your own with future updates. Not to say it's all bad - I just prefer installing packages over compiling whenever I can. – Jawa Nov 10 '09 at 8:50
  • Now it's better just to clone and fetch the latest from github: github.com/git/git.git. Checkout the tag with the latest version. – adymitruk Nov 3 '11 at 18:20
  • 1
    This is totally not needed. The package manager has an official way to introduce new versions in the system. This is just hacking around it. – vdboor May 10 '12 at 13:59
$ sudo apt-get update
$ sudo apt-get install git-core

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

| improve this answer | |
  • I think I'm on Hardy since I am still on version – Andrew Oct 14 '09 at 23:42
  • I was able to install a newer version of Git on Hardy by doing it manually. Is that ok? Or is there a reason Hardy is still on version – Andrew Nov 10 '09 at 18:47

All packadges can be found at https://launchpad.net/ubuntu/+source/git-core

cd /tmp    
sudo apt-get install liberror-perl libdigest-sha1-perl
wget --no-check-certificate https://launchpad.net/ubuntu/+archive/primary/+files/git-core_1.7.0.4-1_amd64.deb
sudo dpkg -i git-core_1.7.0.4-1_amd64.deb
| improve this answer | |

Git 1.6 is available starting with Jaunty: https://launchpad.net/ubuntu/+source/git-core

So if you don't want to compile/install the package yourself, you'll need to upgrade your system to a newer ubuntu version.

| improve this answer | |

I did this on Hardy with the following commands:

wget http://www.backports.org/debian/pool/main/g/git-core/git-core_1.6.3.3-1~bpo50+1_i386.deb
sudo dpkg -i git-core_1.6.3.3-1~bpo50+1_i386.deb

If somebody knows some reason not to do it this way, please comment.

| improve this answer | |
  • This is interesting. Why use backports? Does this automatically keep the package updated? – Andrew Nov 10 '09 at 18:53
  • 3
    One reason not to do it that way is because you're not using Debian. Another reason not to do it that way is because you shouldn't be manually running "dpkg -i". If you want a backport, go through the backport request process for Ubuntu: help.ubuntu.com/community/UbuntuBackports – jamessan Nov 10 '09 at 19:01

First thing, try running the software update utility and see if it's got a new version for you. Alternatively, as root,

apt-get update && apt-get upgrade

If that fails, you could try finding a backported version of git such as this one

If that for whatever reason does not work for you, you could download the source files from the git webpage. Ensure you have build-essential installed ---

apt-get install build-essential

and then if it is anything like any other reasonable package,

./configure --prefix=/usr/local && make && sudo make install
| improve this answer | |
  • 1
    don't use make install. Use checkinstall. It turns the result of your make install into a deb file that allows the package manager to track the installation. – Ryan C. Thompson Nov 13 '09 at 2:29

Why would you ever want to do this?

sudo apt-get build-dep git-core 

on a newly installed Karmic tries to install 560MB/137 packages

https://launchpad.net/~git-core/+archive/ppa is the way to go specially for ease of updates.

| improve this answer | |

The answer from @Manuel Meurer was good, but it didn't work for me since my updated Ubuntu 8.04 "Hardy" has no add-apt-repository command, and it seems to not exist in no package.

So, these are my own instructions just in case someone founds the same problem:

Create a file called 'git.list' within /etc/apt/sources.list.d/ with the following content:

    deb http://ppa.launchpad.net/git-core/ppa/ubuntu hardy main 
    deb-src http://ppa.launchpad.net/git-core/ppa/ubuntu hardy main

Then exec:

    sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com A1715D88E1DF1F24

And then:

    sudo apt-get update
    sudo apt-get install git

If you notice dependency problems during the install, then try this before the previous apt-get commands:

    sudo apt-get purge git git-core
| improve this answer | |
  • Try this to get add-apt-repository working: sudo apt-get install --reinstall python-software-properties && sudo dpkg-reconfigure python-software-properties – Manuel Meurer Mar 8 '13 at 6:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.