我看过其他帖子并在 stackoverflow 上阅读它们 -如何忽略 TFS 中的文件/目录以避免它们进入中央源存储库?
然而这似乎不起作用。
我有一个名为 /FS 的根文件夹,在该目录中我有以下 .tfignore
################################################################################
# This .tfignore file was automatically created by Microsoft(R) Visual Studio.
#
# Local items matching filespecs in this file will not be added to version
# control. This file can be checked in to share exclusions with others.
#
# Wildcard characters are * and ?. Patterns are matched recursively unless the
# pattern is prefixed by the \ character.
#
# You can prepend a path to a pattern to make it more specific. If you do,
# wildcard characters are not permitted in the path portion.
#
# The # character at the beginning of a line indicates a comment.
#
# The ! prefix negates a pattern. This can be used to re-include an item after
# it was excluded by a .tfignore file higher in the tree, or by the Team
# Project Collection's global exclusions list.
#
# The / character is interpreted as a \ character on Windows platforms.
#
# Examples:
#
# # Excludes all files ending in .txt in Alpha\Beta and all its subfolders.
# Alpha\Beta\*.txt
#
# # Excludes all files ending in .cpp in this folder only.
# \*.cpp
#
# # Excludes all files ending in .cpp in this folder and all subfolders.
# *.cpp
#
# # If "Contoso" is a folder, then Contoso and all its children are excluded.
# # If it is a file, then only the "Contoso" in this folder is excluded.
# \Contoso
#
# # If Help.exe is excluded by a higher .tfignore file or by the Team Project
# # Collection global exclusions list, then this pattern re-includes it in
# # this folder only.
# !\Help.exe
#
################################################################################
\BRAND
\CO
\COVER
\COVERBANNER
\DEPT
\DEPT-CATS
\LIB
\PRODUCTS
Run Code Online (Sandbox Code Playgroud)
但是,TFS 不断尝试添加这些目录。我什至在根目录中有另一个 .tfignore
/FS
我只需要 TFS 中的 /FS 。这是 15GB 的图像工作,不属于 SOURCE 控制,我们有多个区域备份这些图像,创建分支需要大量资源。
我需要使用 CMD PROMPT 从 TFS 中删除 /FS 吗?任何帮助都会很棒。我只是感到沮丧和困惑。
我认为这.tfignore对于本地和服务器工作区来说是相同的,所以:
是的,您必须\FS从源代码管理中删除,但从团队资源管理器中执行此操作就足够了。.tfignore在\FSs 父目录中添加一个。这将确保您的\FS文件夹不会位于源代码管理中,并且在您创建新分支时不会被复制。