How to build / compile / install a High Performance / Latest Version (1.8.3 or later) of Git version control system from Source on Ubuntu 12.04 / 12.10 / 13.04 Server/Desktop

Installing Git on Ubuntu can be as simple as this:

Method 1: The easiest and Ubuntu recommended way - using the Ubuntu package manager:
sudo apt-get install git-core

Well, it takes quite some time for the latest version of Git to reach the Ubuntu repos - as of now, the repo version is around 4 months older than the actual version of Git out there.

To install those, you need to Build/Compile/Install from the latest version of the source code.

Here is how you do that:

Method 2: Build from source - the normal method to get the latest version
To get the latest version manually (the repo version is almost 4 months old now), we should build it from source.

Prerequisites to build Git:
sudo apt-get update
sudo apt-get install autoconf automake checkinstall
sudo apt-get install build-essential
sudo apt-get install zlib1g-dev libssl-dev libcurl4-openssl-dev libcurl4-openssl-dev libexpat1-dev asciidoc
sudo apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev
sudo apt-get install ssh expat zlib1g zlib1g-dev tk python
!!AROUND 700MB download: sudo apt-get install asciidoc docbook2x

tar -zxvf git-1.8.3.tar.gz
cd git-1.8.3/

For a normal git build:
make configure
make all doc info
sudo make install install-doc install-html install-info

For a bit more highly performance optimized git later - useful if you are going to use git for huge repos (!!VERY LONG build time - could take upto an hour)
make configure
./configure --prefix=/usr/local
make prefix=/usr/local PROFILE=BUILD all doc
sudo make prefix=/usr/local PROFILE=BUILD install install-doc install-html install-info

Now, to keep your machine updated with the latest git version every time,
Go to to see the latest version
git clone git://
git fetch
Do a 'git tag' to list all available tags.
'git checkout' to the tag of your preferred version.
then do the abovementioned build, compile, install steps.

1. 3 ways to install Git on Linux (Ubuntu):

2. How to install Git on Ubuntu 12.04:

3. And here is a good beginner tutorial:

Add new comment