Delete merge history in a branch in TFS

Posted by JMarsch on Stack Overflow See other posts from Stack Overflow or by JMarsch
Published on 2010-06-10T20:48:09Z Indexed on 2010/06/10 20:53 UTC
Read the original article Hit count: 610

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.

Rolling 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

© Stack Overflow or respective owner

Related posts about visual-studio

Related posts about version-control