Export (0) Print
Expand All

Understanding Conflict Types

In software development teams where more than one person is working on the same project, it is common for conflict situations to be experienced. Team Foundation source control lets you resolve these conflicts. Conflicts can occur during the following operations:

  • Merging changes between branches.

  • Getting files into your workspace.

  • Checking in new versions of files.

Conflict Types

This topic contains information about the following conflict types:

Version Conflict

File name collision conflict

Local overwrite conflict

Version Conflict

Version conflicts can occur in Team Foundation source control with a check in, get, or merge operation. In all three cases, the conflict results when an entity has evolved along divergent paths.

  • Check-in   Two users check out the latest version of a file. The first user checks in changes creating a new version of the file. When the second user tries a check-in, a version conflict is experienced because their changes were not made against the latest version of the file.

  • Get   Two users checkout the latest version of a file. The first user checks in changes creating a new version of the file. When the second user performs a get latest operation a version conflict is experienced because the get latest operation is trying to update the checked out file in their workspace.

  • Merge   A file has been branched and has then been worked on in both branches. A user tries to merge changes from one branch to the other. A version conflict is experienced because the file has been modified on both branches.

Resolving version conflicts involves merging changes or selecting one set of changes over the other. For more information, see How to: Resolve Conflicts.

Version Conflicts

Local/Source Change Server/Target Change Resolve Options (Get or Checkin) Resolve Options (Merge)

Edit

Rename

Undelete

Edit

Rename

Undelete

Merge changes for me (if there are no conflicts)

Merge changes in merge tool

Undo my local changes

Discard server changes

Merge changes for me (if there are no conflicts)

Merge changes in merge tool

Keep changes in target branch

Copy item from source branch This is the default selection.

 

Delete

Restore file and merge changes for me (if there are no conflicts)

Restore file and merge changes in merge tool

Undo my local changes

Restore file but keep my changes

Restore file and merge changes for me (if there are no conflicts)

Restore file and merge changes in merge tool

Discard changes from source branch

Copy item from source branch

Delete

Edit

Rename

Undelete

Undo my local changes

Discard server changes

Discard changes from source branch

Delete item in target branch

 

Delete

Undo my local changes

Discard changes from source branch

 

 

 

Skip these conflicts (Indicates that conflicts of that type will not be acted upon.)

File Name Collision Conflict

File name collisions can occur in Team Foundation source control with a check-in, get, or merge operation. In all three cases, the conflict results when two or more items try to occupy the same path in the source control server.

  • Check-in   Two users add a file that has the same name to an application they are working on together. The first user checks in the file, and when the second user tries a check-in, a file name collision is experienced.

  • Get   Two users add a file that has the same name to an application they are working on together. The first user checks in the file, and when the second user tries a get latest operation a file name collision is experienced. This is because the first users file cannot be retrieved where the second user has added a file.

  • Merge   An application has been branched and has then been worked on in both branches. In both branches, a file that has the same name has been added. A user tries to merge changes from one branch to the other. A file name collision is experienced because the file added to the source branch can not be branched where a file has already been added to the target branch.

File name collision can result from any operations that adds or moves items in the server path namespace, including add, rename, branch, undelete, and merge.

Resolving file name collisions involves selecting which item will ultimately occupy the source control server path. For more information, see How to: Resolve Conflicts.

File Name Collision Conflicts

Local/Source Change Server/Target Change Resolve Options (Get or Checkin) Resolve Options(Merge)

Add

Branch

Rename

Undelete

Add/

Branch

Rename

Undelete

Undo my local changes

Ignore conflict

Discard changes from source branch

Ignore conflict

 

 

 

Skip these conflicts (Indicates that conflicts of that type will not be acted upon.) This is the default selection.

Local overwrite conflict

Local overwrite conflicts only occur in Team Foundation source control during a get operation. These conflicts occur when a get operation tries to write over a writable file in your workspace. By default, the get operation will only replace files that are read-only. Resolving local overwrite conflicts involves either overwriting the file, or checking out the file and merging changes.

Writable Files

Local/Source Change Server/Target Change Resolve Options (Get or Checkin) Resolve Options(Merge)

Not applicable

Not applicable

Overwrite local file/folder

Ignore conflict

Not applicable

 

 

 

Skip These conflicts (Indicates that conflicts of that type will not be acted upon.)

This is the default selection.

NoteNote

Version conflicts that require a merge tool for resolution cannot be resolved from the Resolve Selected Conflicts dialog box. This dialog box does not contain the option to merge changes in a merge tool. Additionally, if you select Merge changes for me and internal content conflicts exist, the merge tool is not invoked. Instead, 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 filename, if more than one file can not be resolved, then the dialog box will include the number of files.

The compare options are described in the following table:

Conflict Type Source Change Compare Options (Get or Checkin) Compare Options (Merge)

Version

Edit

Rename

Undelete

Local to Server

Local to Original

Server to Original

Source to Target

Source to Base

Target to Base

 

 

Local to Deleted

Local to Original

Deleted to Original

Source to Deleted

Source to Base

Deleted to Base

 

Delete

Original to Server

Deleted to Target

 

 

Not applicable

Not applicable

Filename Collision

Add

Branch

Rename

Undelete

Local to Server

Source to Target

Writable File

Not applicable

Not applicable

Not applicable

See Also

Community Additions

ADD
Show:
© 2014 Microsoft