Visual Studio 2015 tfs将文件添加到源代码管理中

时间:2017-07-04 09:37:02

标签: visual-studio visual-studio-2015 tfs

我有以下问题 -

在团队资源管理器上 - 待更改有一个选项可自动检测添加到源控制下的文件夹的文件。问题是检测到超过50,000个文件。

有没有办法编辑这个清单?删除我不关心的项目,这样当我有我要添加的文件时它会相关吗?

(我知道我可以在源代码管理中添加项目,但我想让这个选项可用)

Detected changes

1 个答案:

答案 0 :(得分:1)

您可以点击“检测到的”链接弹出“提升候选人更改”对话框,然后选择要签入的文件进行宣传。

如果您使用的是本地工作区,则可以添加 .tfignore 文件,以忽略您不希望在源代码管理中检测到的文件。例如:忽略文件扩展名.txt,然后在源代码管理中忽略所有.txt文件。他们将无法被发现。

有关详细信息,请参阅Customize which files are ignored by version control

请注意,对于TFVC,您需要在每个解决方案根目录中加上 .tfignore

  

.tfignore文件规则以下规则适用于.tfignore文件:

     

#开始评论专栏

     

*和?支持通配符。

     

除非以\ _字符为前缀,否则filespec是递归的。

     

!否定文件规范(不忽略与模式匹配的文件)

.tfignore file example

######################################
# Ignore .cpp files in the ProjA sub-folder and all its subfolders
ProjA\*.cpp
#
# Ignore .txt files in this folder
\*.txt
#
# Ignore .xml files in this folder and all its sub-folders
*.xml
#
# Ignore all files in the Temp sub-folder
\Temp
#
# Do not ignore .dll files in this folder nor in any of its sub-folders
!*.dll

enter image description here