Snippet for building Git from source on Ubuntu Linux:

sudo apt-get install git-core build-essential autoconf
sudo apt-get install libdigest-sha1-perl liberror-perl
sudo apt-get build-dep git-core
git clone git://git.kernel.org/pub/scm/git/git.git
cd git
make configure
./configure
make
sudo apt-get purge git-core
sudo make install