First install the package gitfrom a version of Ubuntu with Git 1.7 - say, 12.04 LTS (accurate). Either download them manually and install them using dpkg(a simpler option) or (if you also need many other packages from the exact one), add the exact package repositories to /etc/apt/sources.list.d/and install them using apt-get:
echo 'deb http://archive.ubuntu.com/ubuntu precise main restricted universe multiverse' | sudo tee /etc/apt/sources.list.d/precise
sudo apt-get update
sudo apt-get -t precise install git
, Git apt, . Pinning - ( Debian Ubuntu ) - . howto . - /:
sudo apt-mark hold git