Ubuntu Git Install 1.7.5 and Why

This is post is now quite old and the the information it contains may be out of date or innacurate.

If you find any errors or have any suggestions to update the information please let us know or create a pull request on GitHub

If you use Git a lot, you probably want to run the latest version. Scroll down for some reasons why.

The standard repository version for Ubuntu is 1.7.1, the current latest is 1.7.5 and there are some significant differences.

How to Upgrade Git

To get 1.7.5 on Ubuntu without too much messing about you can do the following:

1. Set up this PPA:

sudo add-apt-repository ppa:pdoes/ppa/ubuntu

2. Now run an aptitude update and upgrade git

sudo apt-get update
sudo aptitude upgrade git

3. Now check your git version

git --version

Full Script for the lazy

sudo add-apt-repository ppa:pdoes/ppa/ubuntu && sudo apt-get update && sudo aptitude upgrade && git --version

Why Upgrade Git?

We have been having lots of merge hassles casued purely by white space changes. Apparently with 1.7.4 new recursive merge strategies came into play that should alleviate this pain and make merging a lot less hassle.

Merge Ignore Whitespace

git merge -s recursive -Xignore-space-change $BRANCH_NAME

Less hassle equals more productive and happier developers :)

Tags: ubuntulinuxupgradegitscriptppamergewhitespacerepositoryapt