Export (0) Print
Expand All

How to: Resolve Conflicts

Team Foundation source control conflicts can occur because of a merge, pending change, or get operations. For more information, see Understanding Conflict Types. The following procedure demonstrates how to resolve these conflicts.

Required Permissions

No permissions are required to complete this task.

Procedure

To resolve a source control conflict

  1. On the File menu, choose Source Control and then Resolve Conflicts.

    NoteNote

    The Resolve Conflicts dialog box will automatically open during a merge operation if any differences exist between the source and destination branches. For more information, see How to: Merge Files and Folders.

  2. In Resolve Conflicts dialog box, the Conflicts section will list the files that have a conflict status. The Conflicts section provides the following information:

    • Name   Lists the name of the file.

    • Type   Lists the type of conflict:

    • Version

    • Filename Collision

    • Writable File

    • Description   Explains why the conflict exists; for example if the source and target have both changed in a merge operation.

    • Path   Lists the local path of the file location.

      NoteTip

      You can sort the columns in the Resolve Conflicts dialog box to make it easier to group by conflict type or by path. Sorting is made easier by clicking the header of the column you want to sort.

  3. Choose either Auto-Merge All to have the system try to automatically merge all conflicts, or select the desired file or files and then click Resolve to resolve the conflicts manually.

    NoteNote

    You can select multiple files by clicking additional files while pressing CTRL. Additionally, you can press CTRL+A to select all files in the conflict list.

    Multiple files   When you choose to resolve multiple file conflicts at the same time, the Resolve Selected Conflicts dialog box is displayed. This dialog box contains up to three drop-down list boxes for each type of conflict being resolved: Version conflicts, Filename collisions, Writable File.

    NoteTip

    Next to the title above the drop-down list box is a number in parentheses which indicates how many conflicts of that type will be acted upon.

    Choose the type of resolution you want in these drop-down list boxes as described in the following tables:

    Single file   If you are resolving conflicts on a single file, chose Auto-Merge All

    The Automatic Merge Summary dialog box appears. This indicates how many conflict merges were attempted and how many were successfully merged. Click OK to return to the Resolve Conflicts dialog box.

    NoteNote

    When internal conflicts occur during the auto-merge operation, you are presented with the Unresolved Conflicts dialog box explaining that some files must be resolved individually. If only one file cannot be resolved, the dialog box includes the file name. If more than one file pertains, then the dialog box will include the number of files.

  4. When you chose Resolve, the Resolve Version Conflict dialog box appears with Conflict Details that shows the local path, changes to occur, and the new name to be applied. Choose one of the following Resolution Options and then click OK.

    Resolution Options Description

    Merge changes for me

    This option tries to automatically merge the file. This option is disabled if it detects a conflict.

    Merge changes in merge tool

    This option prompts you to determine the changes to accept. If selected, the merge tool appears. The panes display the two files that have areas of conflict highlighted. To resolve these conflicts, conduct the following procedure:

    1. Locate a conflict in the two files by clicking Next Change.

    2. Review the differences between the two file versions and choose the change you want to retain in the merge by selecting it. The change is placed in the bottom pane.

    3. Repeat the steps until all the conflicts are resolved.

    4. As soon as satisfied, click OK.

    5. In the Microsoft Visual SourceSafe dialog box, choose Yes to save the file.

    6. In the Accept Merged Result dialog box, click Yes to keep the merged file.

    Copy item from source branch

    This option retains the revisions located in the source branch.

    Keep changes in target branch

    This option retains the revisions located in the target branch.

  5. In the Resolve Conflict dialog box, optionally select Compare to compare files.

  6. Click OK.

See Also

Community Additions

ADD
Show:
© 2014 Microsoft