TF.exe equivalent to TFPT.exe scorch

major-mann picture major-mann · Dec 5, 2013 · Viewed 7.5k times · Source

I have been looking for the TF.exe command line equivalent to git reset. I found TFPT scorch, however this is for use on a build server (jenkins), and I cannot seem to get the power tools installed (in a standard manner) or working (non standard, copy across).

Is there either

  1. A way to install tfpt.exe on a build server (that does not, and must not, have visual studio)?
  2. A way to emulate this command with a collection of TF.exe commands?

Answer

Sumo picture Sumo · Jun 15, 2015

You don't specify which version of TFS you are using. However, there is an equivalent: tf reconcile /clean.

As per the tf documentation:

Microsoft (R) TF - Team Foundation Version Control Tool, Version 12.0.30501.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Compares the current state of the workspace on disk with the server's view,
either to clean the workspace or to promote unpended local changes.

tf reconcile /clean [/diff] [/noprompt] [/preview] [/recursive] [/ignore]
             [/unmapped] [/exclude:itemspec1,itemspec2,...] [itemspec]

tf reconcile /promote [/adds] [/deletes] [/diff] [/noprompt] [/preview]
             [/recursive] [/noignore] [/exclude:itemspec1,itemspec2,...]
             [itemspec]

Running: tf reconcile /clean /diff /noprompt /recursive *.*

Is equivalent to: tfpt scorch *.* /noprompt /recursive /deletes /diff

Interesting fact is that this command is absent from current tf.exe documentation.

Also, as @Jonathan mentions, there is now a tf scorch command as well which is eerily similar to tf reconcile. If there are differences, I cannot find the documentation to back it up. It's very possible it has something to do with working with Local vs. Server workspaces, which was added in 2013 to allow true "offline" development.