Once you have started a comparison session (as described in Getting Started), WinMerge displays the selected files side-by-side in a splitter view, which is called the File Comparison view (or just the "diff view" for short). Different colors are used to highlight the differences between the two files. Gray areas indicate missing lines that were found in the other file. In the above example, the first difference shows that the text
#include "AngleArc.h"
is missing in the left file. Areas that are highlighted yellow on both sides indicate that the selected lines were changed in some way. The second difference in the example above shows that the text
:CObject()
was changed to the following in the right file:
: CObject(), m_drawSize(0,0)
The easiest way to step through the differences is to use the arrow keys on the
keyboard. The down arrow key (or the button on the toolbar)
scrolls to the next difference in the file. The up arrow key (or the
button) scrolls to the previous difference. When you are comparing
files with a large number of differences, you can also use the provided scrollbars to
scroll to the general area and then hit the arrow key to find the difference.
Once you have selected a difference (either by arrowing to it or by clicking it with
the mouse), you can synchronize one side with the other using the right and left arrow
keys. Press the right arrow key (or the button) to copy the selected area of the left
file into the selected area of the right file. Likewise, press the left arrow key
(or the
button) to copy the selected area of the right file into the selected area of the left
file. Using just these few functions, you can easily navigate the differences
between two files & merge changes as desired.
When you have finished comparing the current files, simply close the diff window.
If you have made any changes, you will be prompted to save them at this time.
Note that you can also click the button before closing the window, if you wish.