up vote 3 down vote favorite
5
share [g+] share [fb]

I have Git version 1.5.4.3 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).

link|improve this question

65% accept rate
Which ubuntu version? – tonfa Oct 14 '09 at 22:36
This is already answered on Superuser superuser.com/questions/55542/how-to-upgrade-git-on-ubuntu – gnibbler Oct 15 '09 at 0:14
feedback

migrated from stackoverflow.com Oct 16 '09 at 13:15

This question came from our site for professional and enthusiast programmers.

9 Answers

up vote 4 down vote accepted

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).

link|improve this answer
feedback

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.

link|improve this answer
..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
feedback
$ 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

link|improve this answer
I think I'm on Hardy since I am still on version 1.5.4.3 – 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 1.5.4.3? – Andrew Nov 10 '09 at 18:47
feedback

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.

link|improve this answer
feedback

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.

link|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
feedback

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
link|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 Thompson Nov 13 '09 at 2:29
feedback

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.

link|improve this answer
feedback

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
link|improve this answer
feedback

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

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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