vote up 0 vote down star

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

flag

61% accept rate
Which ubuntu version? – tonfa Oct 14 at 22:36
4  
Maybe a question for Superuser? – Jason Oct 14 at 22:37
+1 I think superuser is better for this 1.5.4.3 is the current version in Hardy – gnibbler Oct 14 at 23:59
This is already answered on Superuser superuser.com/questions/55542/… – gnibbler Oct 15 at 0:14

migrated from stackoverflow.com

7 Answers

vote up 2 vote down
$ 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|flag
I think I'm on Hardy since I am still on version 1.5.4.3 – misbehavens Oct 14 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? – misbehavens Nov 10 at 18:47
vote up 1 vote down

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|flag
vote up 1 vote down check

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|flag
..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 at 8:50
vote up 0 vote down

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|flag
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 at 2:29
vote up 0 vote down

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|flag
This is interesting. Why use backports? Does this automatically keep the package updated? – misbehavens Nov 10 at 18:53
1  
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 at 19:01
vote up 0 vote down

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|flag
vote up 0 vote down

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|flag

Your Answer

Get an OpenID
or
never shown

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