The pleasures of git

Here’s a view of my development repository, with some of my commits from the last two days.

In the image, the interesting bit is the set of lines and dots running up the middle (under the “Graph” heading).  Each dot is a group of changes I made.  Each colour represents a different branch of development.  And the dots are arranged in order chronologically, with my most recent changes at the top.

So as you look from the bottom of the shot to the top, you can see branches branching off from the blue “master” development, and then later on being merged back into master.  (In fact, in the view here, I had two different branches both named “trees”, and which are both being drawn in yellow.  Despite having the same name, they were actually different development branches)

The fascinating thing (at least for me) is to see how much I’m working across different branches simultaneously — at most points on this graph, I have three different development timelines active at once.  As recently as three months ago, this graph was a single straight line, as every commit was just happening straight into the master development branch.

The interesting point is that in retrospect, I was working across multiple development paths back then just as much as I am now;  each commit was likely to be in an entirely different area, working on different projects at different times.  The difference is that now it’s organised in a sensible way.  It’s trivial to see which of my commits belong to which larger goal, and what larger goals are still in progress.  Even if I’m rapidly switching from task to task.  Previously, I had to manage all of these things in my brain;  now, the version control system helps keep track of it all for me.  Which frees me to think about the code, rather than about the implementation strategy.

It’s very difficult to imagine going back to a traditional non-intense-branching development methodology, now.  It’s not actually a change to how I develop — I was already madly jumping around between tasks!  The intense-branching approach just makes this development practice far easier to track and understand, when viewed from months later.