web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Discarding merge of a changeset in TFS

PA-22040759-0 Profile Picture PA-22040759-0 6,194
On a project I work on, we have just had the first branch of my life. The merge features in TFS helps me merge needed changes between the two branches and it works just perfect.

As part of the branch I have had to assign a particular range for label id's in one of the branches. This is to avoid conflicts when merging the label files. You set up the label id range from Version Control / System settings / General. Changing this, triggers a change to VCSDef.xml which is also under version in TFS.

This is obviously not a change that I'd ever want to merge. Fortunately there is a way to tell TFS to discard the change when suggesting what to merge. There is no UI for the command, so open a Visual Studio command prompt from the workspace folder to use and enter the following:

tf merge /discard /version:C1134 /recursive SourceBranchName TargetBranchName

This also triggers a change, so you must check that change in. And that's it. The changeset is not suggested for merge between these branches again.

Comments

*This post is locked for comments