Resolving Merge Conflicts

When you use a version control system, you might need to merge changes you made to a file with changes made to the same file by someone else. When you update a locally modified file, CVS automatically merges changes from the repository with changes made to your local file. But when conflicts occur, you must decide how to resolve each conflict before you can check your local file into the repository.

You can resolve merge conflicts:

To resolve merge conflicts through the Merge Conflicts Resolver:

  1. In the Explorer, right-click the node of the file that shows the status Merge Conflicts after the file name and choose Resolve Conflicts from the contextual menu.
  2. The Merge Conflicts Resolver is displayed. Merge conflicts are highlighted in red. The icons in the upper-lefthand corner allow you to move through the conflicts in the file.

  3. For each conflict, decide which pane has the text that should be accepted.

    If neither pane has the text you want, open your source file and edit it. When you are done making changes, right-click the node of your source file and choose CVS and choose Update from the contextual menu. Then repeat Step 1 in this section.

  4. Click Accept above the pane that has the text that you want.

    The text you chose is now highlighted in green and is displayed in the Merge Result pane. The text in the pane you did not choose is highlighted in blue.

  5. When you have resolved the conflicts, click OK.
Note To change the background highlight colors that the Merge Conflicts Resolver uses, choose Tools and choose  Options. Expand IDE Configuration and expand  Server and External Tools Settings. Expand Diff and Merge Types and expand  Merge Visualizers. Select Graphical Merge Conflicts Resolver and select the setting you want to change. Click the ellipsis button (...) to choose a color from a color palette.
See also
Merging File Revisions

Legal Notices