Minority Opinions

Not everyone can be mainstream, after all.

Manipulating Git Commit Graphs

leave a comment »

I have two repositories with very long, very complicated commit graphs.  In each one, I now have the need to tease out certain commits from one branch for insertion into another.  In each one, it’s being very messy.

What I really want is a combination of gitk/gitg/qgit with Planarity to let me move nodes or branches around with the mouse, while still being able to see what they are.  So far, I’ve come up with a combination of git-dot with dot and inkscape to get something that almost works.  As a very small sample:

I don’t even want to figure out which branches those are right now.  Sadly, with the svg format, I was able to ungroup the picture to allow me to drag these things around, but the arrows don’t follow.  Maybe I’ll try the dia format next, and trim out all of the history before the relevant split points.  If I can get either one to work, that is; dot’s man page claims to support dia, but the dot command itself doesn’t recognize it, and I’m getting iffy results from git log’s –since option.

Or maybe I’ll play around with the gPlanarity source until it can import a graph from git.  That sounds like a lot more fun, but potentially a lot more work.


Written by eswald

3 Apr 2012 at 6:11 pm

Posted in Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s