Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to merge two changesets only (TFS)

alt text

You see 162489 and 162990, How can I merge them ?

like image 861
Bilgin Kılıç Avatar asked Oct 11 '10 11:10

Bilgin Kılıç


People also ask

How do I merge two branches in TFS?

Right-click the main branch, point to Branching and Merging, and then click Merge… The Source Control Merge Wizard appears. On the Select the source and target branches for the merge operation screen: In Source branch, specify the main branch. In Target branch, specify the development branch.

How do I merge two projects in TFS?

Click the File menu, point to Source Control, point to Branching and Merging, and then click Merge. The Source Control Merge Wizard will displayed. 3.In the Target branch drop-down list, select the target team project branch to which you want to merge the source branch(first branch). 4.


1 Answers

I'm guessing that you want to merge only those two specific changesets into another branch.

You cannot merge multiple changesets in one go, unless the changesets are in sequence.

Using the tf command line tool you specify a range of versions by separating the version with a tilde character.

tf merge /recursive /version:C162489~C162990 "$/SourceBranch" "$/TargetBranch"

In this case the changes 162987 and 162967 will also be included.

If you are using the UI in Visual Studio then the merge dialog will prevent you to select multiple individual changesets unless they are in sequence.

To merge two separate changesets into another branch you will have to do it in two steps:
merge 162489 and then 162990 (start with merging the oldest changeset in case both changesets contain changes to the same files).

Then your workspace for the target branch will contain the changes for both changesets and now you can check-in the merges as one changeset in the target branch.

like image 106
Martin Hyldahl Avatar answered Sep 20 '22 05:09

Martin Hyldahl