Upgrading git from the source repository in Ubuntu

Solution 1:

2.0.2 has been uploaded 3 days ago in this PPA: https://launchpad.net/~git-core/+archive/ubuntu/ppa

sudo add-apt-repository ppa:git-core/ppa

But if this isn't what you want, and you have clone the git repo, then

sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev bzip2
cd /path/to/local/clone/of/git
./configure
make
sudo make install