Make Diffs Readable
Every time I look at a diff, I’m reminded of the gulf between me and Linus Torvalds. I just know he’s fluent in Finnish, English, and diff, but me? I know the diff syntax. I study the semantics. Heck — I even colorize my diffs. Doesn’t matter. Each time I view a diff, my head cocks to one side, and then the other, in utter bemusement. My hands stab tentatively right and left in flow with the <s and >s as if directing airplanes to their gates. I begin muttering like a paranoid schizophrenic, telling myself that “plus signs means addition, so those lines must be new, and those double @ signs mean an owl is staring at me, no, wait . . . .”
Apple recently featured a tool on its download site called MDR: Make Diffs Readable that transforms diffs from the inscrutability of Finnegans Wake to something along the lines of Fun with Dick and Jane. Now, before each commit, I type:
git diff | mdr
The output looks something like this:
No hand-waving, no head tilting, no confusion, no owls. I immediately understand what changed and what differences I’m committing. Great freeware tool from Half Full Heart.
Sadly, now that I see my code more clearly, I realize the gulf between me and Torvalds is wider than I realized.
This is such a great resource that you are providing and you give it away for free. I enjoy seeing websites that understand the value of providing a prime resource for free. I truly loved reading your post. Thanks!
Really nice post,thank you, best website ever
Very detailed post can i translate into Spanish for my blogs readers? If thats OK what type of acknowledgement would you prefer?
Go ahead and translate, and link back to this post.
Nice! I’ve been using DiffMerge (http://www.sourcegear.com/diffmerge/screenshots.html) which probably has more features but it’s not as fast or clean. I’ll give this one a try.
Also, I didn’t see it mentioned in your post on your favorite apps, have you tried GitX? The main homepage is here – http://gitx.frim.nl/ and this is a link to a fork with some additional features: https://github.com/brotherbard/gitx
I’ve tried GitX, Tower, and got the beta for GitMac. I haven’t yet figured out why I’d use a gui instead of cli for git, though.
Generally I use the cli for staging and commiting, but I use gitx occasionally for visualizing branches and merges and as a quick way to cycle through commits.
OK, I just bought Tower. It seems a little awkward not to use cli, but I like being able to visualize things more clearly.