Nick Blakely
Nick Blakely

Reputation: 33

Merging a single change in TFS 2008

I'm looking for a way to quickly merge a single changeset from one branch to another in TFS 2008. To date, my company has backported changes to older versions of our product manually, so no merge history exists between the branches in TFS.

Due to this, attempting to merge just one changeset from the UI results in a complete mess. Instead of just merging in the changes made between the changeset I specified and the previous version (which is what I want), it wants to merge everything.

Is it possible to achieve this in TFS? Basically, I just want to merge the changes in one changeset into the destination file, ignoring all other differences between source and destination. I've tried a baseless merge from tf.exe as outlined in this post, but that still resulted in more differences than were in the changeset.

Upvotes: 2

Views: 259

Answers (3)

Steve Peterson
Steve Peterson

Reputation: 21

While the 'tf merge' command cited in Stewart's answer works, there's also UI in VS 2013 to do this directly.

From the Merge Wizard, for "Select the source branch changes you would like to merge" select "Selected changesets". The next step in the wizard will show changes that have not been merged to the target branch.

Upvotes: 2

Stewart
Stewart

Reputation: 4028

Lets say you want to merge changeset 1234. The command is:-

tf merge /r sourcebranchdir targetbranchdir /version:C1234~C1234

Upvotes: 2

Chrono
Chrono

Reputation: 1473

Although I don't have a lot of experience with the Visual Studio Command Prompt, I can see that the tf merge has a /version option which can take a changeset number in the form of Cnnnnnn. Where Cnnnnnn is C followed by the id of the changeset.

Upvotes: 2

Related Questions