Three-way merge

Three-Way File Comparison

The default view used in 3-way file comparison is a vertical layout with all the panes displayed side-by-side. Code Compare's comprehensive user interface contains a special toolbar which allows aligning all the panes according to your preferences - a single click can switch between vertical and mixed layout, hide or show specific panes. You need to choose the base file and place it on the middle pane. The rest of the panes will contain two different editions of the base file, while the rest of panes contain the files that should be compared with the base file. To diff three files at the same time, you can call Code Compare through the Windows Explorer (right-click a file and choose Compare with Code Compare). Alternatively, you can drag and drop the required files directly into Code Compare.

Three-Way Merge

Apart from its comprehensive comparison features, Code Compare is an advanced visual 3-way merge tool. In other words, it allows you to compare and merge three files at once. Such functionality makes Code Compare incredibly useful in cases where a project is developed by several people at once. Three-way merge supports the same features you can access when comparing and/or merging two files. However, it provides you with a better dimensional picture and allows you to save a huge amount of time as compared to 2-way merge.

For this reason, the 3-way merge is considered an advanced functionality, so it is not included in the free Code Compare edition and only available in Code Compare Pro.

You can add your files by choosing the respective option in the Windows Explorer context menu or by dragging & dropping the files into Code Compare. If you integrate Code Compare with a version control system, you will be able to launch the 3-way merge directly from that system.

Integration With Version Control Systems

Code Compare can be seamlessly integrated into any VCS that supports external comparators. With this, you can easily use Code Compare as a 3-way merge tool for Git, Mercurial, Perforce and other popular version control systems. Here's the full list of supported systems:

  • Subversion
  • Team Foundation Server
  • Mercurial
  • TortoiseHg
  • Git
  • TortoiseGit
  • Visual SourceSafe 2005
  • Perforce
  • P4VS
  • StarTeam

For details on the major feature set of our file diff and merge tool, refer to the overview page of Code Compare.