December 15th, 2005

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.

Category
DevOps

Author

0 comments

Discussion are closed.