Friday, January 9, 2009

Getting Started with Git on Ubuntu

I'm going to be taking a look at Git and how well/if it will fit in with an existing Subversion repository, so first thing to do is get it installed (I'm using Ubuntu 8.04 so your mileage may vary, but I followed the exact same steps on my laptop with 8.10)

First off - DON'T use the version in the Ubuntu repositories, it's out of date - but this is still super easy.

Grab the latest source tarball from the Git site. (was 1.6.1 at the time of writing this)

Open up a terminal.
$ sudo apt-get build-dep git-core git-doc
Go into the directory where you saved the git tarball.
$ tar -zxvf git-1.6.1.tar.gz
$ cd git-1.6.1/
$ sudo make prefix=/usr all doc

(Note: I'm installing it for all users, you could leave the 'prefix=/usr' part out to only install it for yourself. Also, this step will take a while...)
$ sudo make prefix=/usr install install-doc
$ git --version

Assuming all went well, you should see something like:
git version 1.6.1

No comments: