P.Brian.Mackey
P.Brian.Mackey

Reputation: 44295

Is it possible to merge by changesets that have already been merged?

My Test and Dev branches are out of sync. The Changesets I want have already been merged through. I want to simply take what is in the Development subdirectory and push it straight into Test as it stands, overwriting whatever test has. Is this possible?

e.g.

$\dev\blah\subdirectory => $\test\blah\subdirectory

I know I can take each file I want and manually copy from Dev => Test then check in. There are 10 files so I prefer not to do it that way. Does TFS offer any means to accomplish this task?

Upvotes: 6

Views: 3931

Answers (3)

Frankie C
Frankie C

Reputation: 349

Simply merge from source to target branch. You can do this by going to source control and right clicking on the source branch, then select "Merge." That will bring up a new window, then merge all changes, select your target branch and that's it. You can also merge between change sets for individual items.

Upvotes: -1

Taylor Lafrinere
Taylor Lafrinere

Reputation: 3104

From a visual studio command prompt change directories to your workspace that you want to run the merge in and then run "tf merge sourcebranch targetbranch /r /force". That will ignore merge history and copy the content like you want.

Upvotes: 8

maxisam
maxisam

Reputation: 22745

I think you can do that in VS2012. not sure about vs2010. Just click on certain folder and right click to see the pop up menu and select merge.

It will bring you a popup and let you select target folder.

When you merge, in VS2012 will let you choose if you want to overwrite or manual merge or auto merge. in VS2010, it will just merge for you tho.

Upvotes: 0

Related Questions