What is the best way to downgrade git into the 1.7.x series on a brand new Ubuntu 13.10 release?
I'm trying to find some ppa for this, but I'm not seeing any.
What is the best way to downgrade git into the 1.7.x series on a brand new Ubuntu 13.10 release?
I'm trying to find some ppa for this, but I'm not seeing any.
First install the git
package from an Ubuntu release having Git 1.7 - say, 12.04 LTS (precise). Either download these manually and install them using dpkg
(simpler option), or (if you'll also need lots of other packages from precise) add the precise 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
Once that's successfully done, pin or hold the git packages in apt
to prevent them from being updated. Pinning is the traditional solution (I've used this on Debian or Ubuntu for years) - see the linked howto for more info on this. Holding is the newer approach and looks far simpler/easier:
sudo apt-mark hold git
Remove current version:
sudo apt-get remove git-core git-svn git-email
Install libcurl3-dev, asciidoc, autoconf and xmlto:
sudo apt-get install libcurl3-dev asciidoc xmlto autoconf
Download the tarball and extract its content:
tar -xvzf git_x.y.z.tgz
Enter the git directory:
cd git
Compile and install:
make configure
./configure --prefix=/usr
make all doc
sudo make install install-doc
Running an old version is probably a bad idea but if you really want to do it, you'll have to install it from source.
Simply download the source code for the version of your choice, remove the existing git package with apt-get remove git
and then manually compile git from source. You can check the INSTALL file for full instructions but basically, make sure that you've already got build-essential from apt-get and then make; make install