Delete merge history in a branch in TFS
Suppose I have a main branch and a dev branch. Suppose I merge some stuff from dev into main.
- I check in the merge
- Now I decide "whoops, the dev branch wasn't really ready for me to merge into main yet."
- I want to tell TFS: remove that change set from main and forget that the merge ever happened.
Ro开发者_Python百科lling back the changeset is easy enough -- I can use the TFS powertools ROLLBACK command. on the Main branch (with the /changeset /recursive flags)
However, I will get a warning from the rollback that the merge history for the files has not been deleted.
Effect: Later, when dev is ready to be merged into main, the changes in the files that were rolled back previously are NOT merged into Main (this is because TFS "thinks" that those merges are already done.
My goal: When I rollback, make TFS remove the merge history so that when I merge dev into main later on, everything merges.
How can I do that?
BTW: I'm using TFS 2008 SP1
Rollbacks in TFS 2008 aren't that great. It is essentially a re-check-in of a previous version. Since you lost that merge history, you may need to /force
the merge from the command line when you do the merge next time. That should get it to ignore the fact that the previous merge history is out there.
I ran into a similar problem. One thing I think might help you is the tf.exe merge /discard option. What this allows you to do is perform a fake merge of files and remove the change from the merge history without actually performing the merge.
http://msdn.microsoft.com/en-us/library/bd6dxhfy(v=vs.80).aspx
Hopefully that helps!
精彩评论