Team Foundation Server:如何删除不在版本控制中的本地文件?
我正在尝试在同一解决方案的分支之间执行复杂的合并。我们使用 Team Foundation Server,但我更喜欢将本地文件夹与 WinMerge 进行比较,而不是直接依赖 TFS 来告诉我发生了什么变化。问题是,有很多不在源代码管理中的文件污染了 WinMerge 文件夹比较:bin、obj、静态代码分析文件、在本地创建但被丢弃且从未删除的剩余项目...
我可以删除本地文件夹并强制从源代码管理获取以清理它,但我通过缓慢的 VPN 连接到源代码管理,这可能需要一段时间;或者我也可以手动删除我认为重复的文件,但这过于经验主义而无法详尽无遗。
所以这是我的问题:是否有任何 tfs 命令可以清理本地文件夹?
I am trying to perform a complicated merge between branches of the same solution. We use Team Foundation Server, but I would prefer compare folders locally with WinMerge instead of relying on TFS directly to tell me what changed. The problem is, there are a lot of files that are not in source control which pollute the WinMerge folder comparison: bin, obj, static code analysis files, remaining projects that were created locally but discarded and never deleted...
I could delete local folders and force get from source control to clean it, but I'm connected to the source control through a slow VPN and it could take a while; or I could also manually delete whichever files I think are duplicate, but that is too empirical to be exhaustive.
So here's my question: is there any tfs command to clean local folders?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
不,没有命令。由于版本控制不知道未添加到版本控制的文件,因此无法删除它们。
No, there is no command. As far as the version control doesn't know about the files that are not added to the version control, it cannot delete them.
对于 Visual Studio 2017,没有 Power Tools,但好消息是大部分功能已移至 TFS 2017。因此,您可以简单地使用以下内容,而无需安装任何工具。
For Visual Studio 2017, there is no Power Tools but the good news is that most of the features are moved into TFS 2017. Therefore, you can simply use the following without installing any tools.
您可以使用:
tfpt scorch
..命令来实现此目的。 TFPT 命令行是 TFS 电动工具的一部分
You can use the:
tfpt scorch
..command for this purpose. the TFPT command line is part of the TFS Power Tools
2015 年,tfpt 已被弃用。下载 2015 TFS Power Tools 后,新命令为:
结束点假定您的开发人员命令提示符位于您希望从中启动的工作区的根目录,而 /recursive 假定您希望包含所有子目录。
当您运行该命令时,它会弹出将进行的所有更改的预览,并让您有机会选择要保留的更改(如果不是全部的话)。
注意:待处理文件不会包含在结果中,这通常是您想要的。如果您也想删除它们,则应首先撤消待处理的更改。
In 2015 tfpt has since been deprecated. After downloading the 2015 TFS Power Tools the new command is:
The ending dot assumes your Developer Command Prompt is sitting at the root directory in your workspace you wish to start from, and /recursive assumes you want to include all subdirectories.
When you run the command it will pop up a preview of all changes it will make, and give you the opportunity to cherry-pick which ones you'd like to keep, if not all.
Note: pending files will not be included in the results, which is usually what you want. If you want to remove them as well, you should undo your pending changes first.