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
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.Sign up to join this community
The package you most likely want is git-core.
(Works just fine without adding an extra repository.)
Update: This has now been fixed; in squeeze and beyond the git package is now called git.
To get ~1.7.1 use this method. If you want ~220.127.116.11 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.
Add this line:
deb http://archive.debian.org/debian-backports/ lenny-backports main contrib non-free
to your /etc/apt/sources.list.
If you get get a security warning about NO_PUBKEY AED4B06F473041FA, run step 3, 4 and 5 -- if not, skip to step 6.
gpg --keyserver pgp.mit.edu --recv-keys AED4B06F473041FA
gpg --armor --export AED4B06F473041FA| apt-key add -
apt-get update again to confirm.
Note, adding the debian-backport-keyring is no longer necessary.
apt-get -t lenny-backports install git
git version 18.104.22.168