TFS 创建一个 $tf 文件夹,其中包含千兆字节的 .gz 文件.我可以安全地删除它吗? [英] TFS creates a $tf folder with gigabytes of .gz files. Can I safely delete it?

查看:69
本文介绍了TFS 创建一个 $tf 文件夹,其中包含千兆字节的 .gz 文件.我可以安全地删除它吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2012 和 Microsoft TFS 2012.

I am using visual studio 2012 with Microsoft TFS 2012.

在我的 c: 驱动器上创建的工作区上,创建了一个隐藏文件夹 $tf.我怀疑 TFS 创建了这个文件夹.它是潜伏的磁盘空间,因为当前的大小现在是几 GB,它大约是整个工作区所需的 GB 磁盘空间总量的 25%.所以这个隐藏的 $tf 文件夹非常大.

On the workspace that is created on my c: drive, a hidden folder $tf is created. I suspect TFS from creating this folder. It's lurking diskspace as the current size is several gigabytes now and it's about 25% diskspace of the total amount of gigabytes needed for the complete workspace. So this hidden $tf folder is quite huge.

结构是这样的:

c:\workspace\$tf\0\{many files with guid in filename}.gz
c:\workspace\$tf\1\{many files with guid in filename}.gz

有谁知道我是否可以安全地删除这个 $tf 文件夹,或者是否绝对有必要跟踪工作区内的更改?

Does anyone know if I can delete this $tf folder safely or if it is absolutely necessary to keep track of changes inside the workspace?

推荐答案

TFS 会保留工作区中所有文件的哈希值和一些附加信息,以便它可以对本地工作区进行更改跟踪并快速检测文件中的更改.它还包含文件的压缩基线.二进制文件和已经压缩的文件会占用相当多的空间.简单的 .cs 文件应该很小(取决于您的 FAT/NTFS 簇大小).

TFS keeps a hash and some additional information on all file in the workspace so that it can do change tracking for Local Workspaces and quickly detect the changes in the files. It also contains the compressed baseline for your files. Binary files and already compressed files will clog up quite a bit of space. Simple .cs files should stay very small (depending on your FAT/NTFS cluster size).

如果您想摆脱这些,请将工作区类型设置为服务器工作区但失去了本地工作区的优势.

If you want to get rid of these, then set the Workspace type to a server workspace, but lose the advantages of local workspaces.

删除这些文件只是暂时的,因为 TFS 会在您执行 Get 操作后立即强制重新创建它们.

Deleting these files will be only temporarily since TFS will force their recreation as soon as you perform a Get operation.

您可以通过执行以下操作来减小此文件夹的大小:

You can reduce the size of this folder by doing a few things:

  • 创建小型的、有针对性的工作区(仅抓取您需要进行更改的项目)
  • 隐藏文件夹,排除包含您不需要的项目的文件夹.尤其是包含大量大型二进制文件的文件夹
  • 将您的依赖项放在 NuGet 包中,而不是将它们签入源代码管理..
  • 将您的 TFS 工作区放在一个具有较小 NTFS/FAT 簇大小的驱动器上(如果只有 1KB 文件,64Kb 的簇大小将严重增加所需的磁盘空间量.

要设置服务器工作区,请更改隐藏在高级工作区设置部分中的设置:

To setup a server workspace, change the setting hidden in the advanced workspace setting section:

这篇关于TFS 创建一个 $tf 文件夹,其中包含千兆字节的 .gz 文件.我可以安全地删除它吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆