TFS: Discard changesets when merging to branches

When changes are branch specific and should not be merged (back) to other branches, these changes should be discarded.

The following TFS command will discard changsets:

tf merge $/Project/SourceBranch $/Project/TargetBranch /discard /recursive /version:C10000~C10000

This example command discards pending merge changesets from SourceBranch to TargetBranch.
It discards changeset 10000. The version is a from ~ to, so you can discard multiple changesets at once.

When the command has finished, you still need to check in the merge.

The following two tabs change content below.
I'm a software developer from Utrecht. Interested in DDD, continuous delivery, new technologies & frameworks.

Latest posts by Vincent Keizer (see all)

Leave a Reply

Your email address will not be published. Required fields are marked *