原文地址:http://digitalocean.com/community/articles/how-to-install-git-on-debian-7
Install Git with Apt-Get
apt-get install git-core
Install Git from the Source
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
安装gettext时应去掉autopoint,autopoint依赖自带的git-core 1.7.10.4。
wget https://git-core.googlecode.com/files/git-1.8.1.2.tar.gz
wget --no-check-certificate https://www.kernel.org/pub/software/scm/git/git-1.8.4.2.tar.bz2
tar -zxf git-1.8.1.2.tar.gz
cd git-1.8.1.2
Global Install
make prefix=/usr/local all
sudo make prefix=/usr/local install
git config --global user.name "NewUser"
git config --global user.email newuser@example.com
git config --list