How to install git 1.8 or above on Debian Wheezy How to install git 1.8 or above on Debian Wheezy git git

How to install git 1.8 or above on Debian Wheezy


I would definitely recommend using the backports version. To use the backports repository, keep in mind that you must add the following line to your /etc/apt/sources.list:

deb http://http.debian.net/debian wheezy-backports main

And then you can retry with apt-get. You will find full instructions at http://backports.debian.org/Instructions/#index2h2


Let me provide a clean copy/paste solution:

echo "deb http://http.debian.net/debian wheezy-backports main" >/etc/apt/sources.list.d/wheezy-backports.listsudo apt-get update -qqsudo apt-get -t wheezy-backports install -y -qq git mercurial


Clone it from its repo https://github.com/git/git and compile it yourself. I've done it on Cygwin and it was easy, so it should be OK on Debian. Read the INSTALL file, it is fairly self-explanatory.

If you haven't compiled software before you should know that there will be quite a few pre-requisites required (they are listed in the INSTALL). You should just be able to apt-get them.