If I run the following command on Debian Lenny:

apt-get install git

... I'm unable to use git:

# git --version
bash: git: command not found
link|improve this question

58% accept rate
feedback

2 Answers

up vote 10 down vote accepted

The package you most likely want is git-core.

(Works just fine without adding an extra repository.)

link|improve this answer
Aha, that's a much easier approach. Thanks. I'm surprised that the Debian site didn't make this more clear. Oh well, that's Debian for you I guess. – nbolton Jul 4 '10 at 12:08
However, with this approach you only get git version 1.5.6.5 – nbolton Jul 4 '10 at 15:31
Yes, that seems to be the version of the dvcs git being provided in lenny. So if you really need/want a newer version, there is still a benefit in going for the backports. – andol Jul 4 '10 at 15:45
Will still mark yours as the valid answer, since it's less complicated! ;-) – nbolton Jul 4 '10 at 16:27
feedback

To get ~1.7.1 use this method. If you want ~1.5.6.5 then use andol's answer.

This is because git is a dummy package in Lenny which provides gnuit.

However, you can get around this by using the lenny-backports git package:

UPDATE: As of September 5th 2010, this method has changed slightly as backports.org is being phased out the instructions now follow the recommended solution to install from the latest Debian backports.

  1. Add this line:

    deb http://backports.debian.org/debian-backports lenny-backports main contrib non-free
    

    to your /etc/apt/sources.list.

  2. Run: apt-get update.
    If you get get a security warning about NO_PUBKEY AED4B06F473041FA, run step 3, 4 and 5 -- if not, skip to step 6.

    Run: gpg --keyserver pgp.mit.edu --recv-keys AED4B06F473041FA

    Run: gpg --armor --export AED4B06F473041FA| apt-key add -

    Run: apt-get update again to confirm.

    Note, adding the debian-backport-keyring is no longer necessary.

  3. Run: apt-get -t lenny-backports install git

  4. Run: git --version

    git version 1.7.2.3
    
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.