Compile Git on debian

Debian seems to be a bit slow on getting recent git packages, so here is a guide to compile.

Packages

At first you need git, to get the latest git sources and some other packages for building it. apt-get install git-core build-essential asciidoc xsltproc xmlto docbook2x libcurl4-openssl-dev libexpat1-dev tcl-dev

go to some directory to build git (/usr/src for example) and get the git sources. git clone git://repo.or.cz/git.git cd git git checkout -b build-1.6.0 v1.6.0 make prefix=/usr all doc info

replace 1.6.0 with a recent version.

after that you can install it, as root of course: make prefix=/usr install install-doc install-info

there might be an error like this:

No `START-INFO-DIR-ENTRY' and no `This file documents'. install-info(git.info): unable to determine description for `dir' entry - giving up No `START-INFO-DIR-ENTRY' and no `This file documents'. install-info(gitman.info): unable to determine description for `dir' entry - giving up make[1]: *** [install-info] Error 1

I currently ignore it, it's only about some failing documentation installation, but man pages seem to work.