Visual Studio ALM + Team Foundation Server Blog

Bringing you news, technical articles, and other useful content about Visual Studio ALM and Team Foundation Server

Understanding Merging

Understanding Merging

  • Comments 2

Merging is the process of combining the changes in two distinct branches. A merge operation takes changes that have occurred in the source branch and integrates them into the target branch. Merging integrates all types of changes in the source branch including name changes, file edits, file additions, and file delete and undelete changes. If items have been modified in both the source and target branches, you will be prompted to resolve conflicts.

Merging can be conducted through Source Control Explorer, or from the command line using the Merge Command.

What Occurs During a Merge Operation

During a merge operation, the following actions occur:

  • The merge will identify any added files or folders in the source branch and try to add the corresponding items in the target branch.

    Note   A namespace collision can occur if the item being added from the source branch shares an identical name with an item that has been added to the target branch. Team Foundation does not handle the resolution of this type of conflict; however, an error message is logged.

  • The merge will review the history for each item in the source branch that also exists in the target branch. For each item, changes that were made in the source branch that do not exist in the target branch will be merged to the target branch. If the item has already been modified on the target branch, a conflict will be detected.

    Note   During a merge operation, you have the choice of merging either specific versions of items, or all changes.

How to Merge Changes

Merge operations can be performed from either the Source Control Explorer or the command line using the Merge Command.

Merge History

The Team Foundation source control server keeps a historical record of all merges that have occurred. You can review this information from the command line using the Merges Command.

  • Hi,

    I've only just come across your post, and it relates directly to an issue I am currently experiencing when using branch/merge - specifically, changes are getting lost after a merge operation that doesn't trigger any conflict resolution, when it needs to.

    I have outlined the scenario here:

    http://blogs.conchango.com/jamesdawson/archive/2005/12/20/2518.aspx

    I would appreciate your thoughts.

    Many Thanks.
  • So after receiving an e-mail from someone asking whether I'd heard anything more regarding the TFS
Page 1 of 1 (2 items)
Leave a Comment
  • Please add 8 and 5 and type the answer here:
  • Post