For many of us developers, Ubuntu is by no means an uncommon choice of OS we use for development purposes. Likewise, with all the buzz going around about Git and how great distributed version control is, it just so happens that Git has also now become the version control system of choice for many developers and development teams (and Atlassian’s Stash for Git repo management). The problem is that Git is such a rapidly moving project and Ubuntu 12.04 does not come with the latest version needed to work with Stash. We love Ubuntu, we love Git, and we love Stash (and we know you do too!); so in order to get these three entities to work with each other, we decided we would install the latest version of Git directly from the source. Here’s how we did it.

As mentioned before, the 12.04 version of Ubuntu comes with the older version of Git (1.7.5) and Stash works with the newer version of Git (1.7.6 or higher). To get the newer version of Git you have to build it from source, which is easy to do. I will describe two ways, both work for Stash.

Git from source tarball
This is the traditional way.

Quickly, here are the steps, if you are in a rush:

sudo apt-get build-dep git-core
wget http://git-core.googlecode.com/files/git-1.7.11.4.tar.gz
cd git-1.7.11.4
make configure
./configure –prefix=/usr/local
make
sudo make install

Here are the steps explained:

First, install these dependencies the Ubuntu way:

sudo apt-get build-dep git-core

This doesn’t contain the asciidoc tool-chain for the doc compilation. It’s actually a little tricky to give a general step for a working asciidoc tool-chain. But you may try using: apt-get build-dep git-doc

Get the source code tarball, the information about it could be found at http://git-scm.com.

wget http://git-core.googlecode.com/files/git-1.7.11.4.tar.gz

Finally, welcome to git. Enjoy!
For more information

Addteq, is an officially recognized Atlassian expert. We can provide a wide array of services for your development teams and Atlassian products. If you have any questions about this post or would like to learn more about Stash, please feel contact us by visiting our website at www.addteq.com.