How to: Merge File Versions
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:
Choose the type of merging you prefer, as described in How to: Enable Merging.
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.
If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.
When the conflicts are resolved, you are prompted to check in the file. Click OK.
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:
Choose the type of merging you prefer, as described in How to: Enable Merging.
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.
If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.
When the conflicts are resolved, you are prompted to get the file. Click OK.
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:
Choose the type of merging you prefer, as described in How to: Enable Merging.
In Visual SourceSafe Explorer, select the file version to merge.
On the Versions menu, click Merge Branches.
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.
Use the Comment box to enter an optional comment about the merge operation.
Click Merge to combine the file versions.
Click OK.
If there is a merge conflict, Visual SourceSafe notifies you. Resolve any merge conflicts as described in How to: Reconcile File Differences.
When the conflicts are resolved, you are prompted to merge the branches. Click OK.
Check the database to ensure that the branched file versions have been properly merged.
See Also
Tasks
How to: Check In Changes to an Item
How to: Enable Merging
How to: Get an Item to Your Working Folder
How to: Reconcile File Differences