Jack Polgar

Building the Latest Git

Git is by far my favourite SCM, I gave sluggish Subversion the boot years ago.

I also love to run the latest versions of the things I use. However some Linux distributions don't always have the latest version (Ubuntu still has PHP 5.3, but at least that's better than MediaTemple giving the option for PHP4 or 5.2 when 5.3 was available1).

So I decided to build the latest version of Git myself, which turned out to be so easy the village idiot could do it.

All you have to do is get the version you want to build, since v1.7.12 is the latest version at the time of writing this, we'll build that.

Note: This is for UNIX-like systems, Windows users are shit out of luck.

First, we need to get the source for Git, open your terminal and run:

git clone git://github.com/git/git.git && cd git

Now we need to checkout the source for v1.7.12:

git checkout v1.7.12

Now the fun part, building Git, this will take a while, but once compiled, our Git will be faster:

make prefix=/usr PROFILE=BUILD all
sudo make prefix=/usr PROFILE=BUILD install

Once you've run both of those, you'll be running Git v1.7.12, with a small speed enhancement.

Alternatively, if you're on OS X, you could just use Homebrew to install Git.


  1. MediaTemple has since updated to PHP 5.3, but that doesn't change the fact that their grid hosting sucks and is extremely insecure.