Merging Files

Code Compare provides the ability to merge content with a single click. Special merge buttons called by the hot keys allow you to include content into a certain area of the target pane or remove it from there. In case of three-way merge you can accept all changes by clicking the Accept Merge button.

For example, if you want to add a difference before the related block, hold SHIFT and click the corresponding merge button. The screen below illustrates this case.

Merge example

You can also use the following shortcuts to merge your documents:

Button Modifier Keys Action
  Substitute the related block. It is the default action. You can also press CTRL + ALT + RIGHT ARROW (or LEFT ARROW accordingly) keys to merge differences.
CTRL Add the difference after the related block.
SHIFT Add the difference before the related block.
CTRL + SHIFT Remove the difference (from the selected pane).

You can also use items from the Merge button popup menu to select the type of the merge action.

Merge menu

If you merge files with the help of CodeMerge.exe utility and one of the merged files has been changed, the Result Choice Dialog will appear and ask you what revision changes should be saved to the result file.