I am in the process of migrating from Subversion to Git for all of my projects and needed a way to install the latest version of Git in Ubuntu. There are many excellent resources that I have combined in this howto. I will be installing Git from Launchpad.
The first step in installing the latest version of Git is to tell apt where and how to get Git. These instructions are for Ubuntu Hardy Heron 8.04 LTS and will also work on later versions. Note that since Ubuntu 9.10 you can use the "sudo add-apt-repository" method to add the latest version of Git to Ubuntu. Create "/etc/apt/sources.list.d/git.ppa.list" and add the following lines (note that you can skip the deb-src if you do not need the Git source):