Working with Tortoise versioning (SVN or GIT), I've come across two diff/merging programs, TortoiseMerge and KDIFF3, I'm sure there are plenty of tools, to each his own.
First, lets take a look at TortoiseMerge.
The original view is full of dots, lines and arrows, you can't really see the forest for the trees, so lets start by removing the Whitespaces and Inline diff word-wise.
Good, now we can see that only the r changed.
On with KDIFF3
Not much difference except its not showing the line as deleted on the original side but only that it changed and what changed.
I personally prefer KDIFF3, it looks cleaner to me and when doing merges I can see the original, their version and my version and it makes my life easier figuring out exactly what and how to merge. another plus in my eyes is its ability to compare whole directories.
Keyboard shortcuts for TortoiseMerge when merging are Ctrl-F8 for the next conflict and Ctrl-F9 and Ctrl-F10 for selecting either theirs or mine changes.
And for KDIFF3, Ctrl-PageDown for the next conflict and Ctrl-1,2,3 for selecting base, their or my changes.
To summaries, knowing what's been changed and reviewing your own changes is one of the most important things you need to do as a programmer. Use any diff tool you're comfortable with, be consistent with it and you'll see the quality of code you and the team produce go up because everyone is keeping tabs on everyone.
0 comments:
Post a Comment