从本地TFS工作区删除非源控制文件夹/文件

时间:2016-09-15 00:29:46

标签: tfs

我们的dev分支在工作中非常庞大,有时我将自己的.sln文件放在那里或其他杂散文件中,但是我想要一种方法来删除那些在本地映射中没有严格源控制的东西。

我该怎么做?是否有tfpt / tf命令?

这也与我有关,因为有时文件夹会从源代码管理中删除,但是因为"文件夹不为空而无法将其删除"。我想在不烧焦工作空间的情况下删除所有这些内容。

3 个答案:

答案 0 :(得分:4)

TFS电动工具(tfpt.exe)有一个名为scorch的功能,"确保源控制和本地磁盘相同"。这是一篇博文,有点解释https://dennymichael.net/2013/03/19/tfs-scorch/。请参阅此回答What is the difference between tfpt scorch and tfpt treeclean了解与treeclean函数

的区别

答案 1 :(得分:1)

一种简单的方法是创建一个新工作区,并从TFS执行Get latest。这样,新工作区中的所有文件/文件夹都受源代码控制。

答案 2 :(得分:0)

Team Foundation版本控制工具(tf.exe)还支持焦烧和treeclean。

tf vc帮助烧焦

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

Ensures that your local disk is identical to the server's view of the
working copy.

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

tf vc帮助和解

Microsoft (R) TF - Team Foundation Version Control Tool, Version 15.129.28306.1
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 vc reconcile /clean [/diff] [/noprompt] [/preview] [/recursive] [/ignore]
                [/unmapped] [/exclude:itemspec1,itemspec2,...] [itemspec]

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