Search This Blog

Tuesday, 17 July 2012

Team Foundation Server 2010 tf commands

Destroying deleted items

The following commands allow you to destroy files in TFS Source Control that are already marked as deleted.  The first step is to find the specific filename with its deleted X postfix.  Open a VS Command Prompt and navigate to your workspace mapped path.  Use the tf dir command to find the files:

tf dir /deleted

Then use the tf destroy command.  Note the absolute source path that doesn't necessarily match the first part of your local mapped path.

tf destroy "$/myProject/main branch/whatever.vb;X188"


Removing unwanted merge candidate changesets

The TFS Source Control merge tool provides a list of candidate changesets that can be merged between a source and target branch.  Once these have been merged they disappear from this list, but it's possible to have changesets for branch specific operations in the list that will never be merged (i.e. changes to web.config that only apply to the build of that branch).  These can be removed using the command line by opening the VS Command Prompt and navigating to the workspace mapped path.  From there the following command applies:

tf merge "$/MyProject/Release Branch" "$/ MyProject /Main Branch" /discard /recursive /version:C5720~C5720 


No comments:

Post a Comment