This documentation is archived and is not being maintained.

How to: Merge File Versions

Visual Studio 2005

Visual SourceSafe supports the merging of file versions as described in Compare and Merge Mechanisms. Merging occurs when you check a file in to the database, when you use the Get Latest Version command, or when you combine two branched file versions. If the database detects no merge conflicts, the merge operations are automatic.

Merging File Versions at Check-in

To merge file versions at check-in:

  1. Choose the type of merging you prefer, as described in How to: Enable Merging.

  2. Now select the file that you want to check in, and click Check In on the Versions menu. If you have questions about this operation, see How to: Check In Changes to an Item.

  3. If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.

  4. When the conflicts are resolved, you are prompted to check in the file. Click OK.

  5. Examine the checked-in file to ensure that it contains merged changes.

Merging File Versions During a Get Latest Version Operation

To merge file changes during a Get Latest Version operation:

  1. Choose the type of merging you prefer, as described in How to: Enable Merging.

  2. On the Versions menu, click Get Latest Version. If you have questions about this operation, see How to: Get an Item to Your Working Folder.

  3. If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.

  4. When the conflicts are resolved, you are prompted to get the file. Click OK.

  5. Check your working folder to ensure that the retrieved file reflects the merged changes.

Merging Two Branched Versions of a File

To merge two branched versions of a file:

  1. Choose the type of merging you prefer, as described in How to: Enable Merging.

  2. In Visual SourceSafe Explorer, select the file version to merge.

  3. On the Versions menu, click Merge Branches.

  4. In the Merge to <name> dialog box, use the Projects box to select the project that has the version of the file into which you want to merge changes.

  5. Use the Comment box to enter an optional comment about the merge operation.

  6. Click Merge to combine the file versions.

  7. Click OK.

  8. If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.

  9. When the conflicts are resolved, you are prompted to merge the branches. Click OK.

  10. Check the database to ensure that the branched file versions have been properly merged.

See Also

Show: