Building Latest Git On Debian Lenny
Debian Lenny only provides Git 1.5.x out of the box, which is a pretty old git version. Following simple steps show how to update/build git from source:
$ sudo apt-get install tcl
$ sudo apt-get install tk
$ sudo apt-get install python-software-properties
$ sudo apt-get install zlib1g-dev
$ sudo apt-get install build-essential autoconf
$ cd /usr/local/src
$ sudo wget http://kernel.org/pub/software/scm/git/git-1.7.5.2.tar.bz2
$ # or download one from: https://github.com/github/git if kernel.org is down (has happened before)
$ sudo bunzip2 git-1.7.5.2.tar.bz2
$ sudo tar xvf git-1.7.5.2.tar
$ cd git-1.7.5.2
$ make configure
$ sudo ./configure
$ sudo make && sudo make install
Make sure “/usr/local/bin” is in your PATH
$ git --version