Welcome to MSDN Blogs Sign in | Join | Help

Understanding Merging

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.

Published Thursday, December 15, 2005 10:09 PM by vstsuetb

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Understanding Merging

Wednesday, December 21, 2005 6:15 PM by James Dawson
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.

# Update to TFS Merge Issue

Tuesday, September 19, 2006 7:22 PM by James Dawson's Blog
So after receiving an e-mail from someone asking whether I'd heard anything more regarding the TFS

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker