从在线检入TFS中排除文件夹 [英] Exclude a folder from checkin TFS online

查看:305
本文介绍了从在线检入TFS中排除文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在在线使用visualstudio.com作为TFS,并在那里创建了我的代码存储库.

i am using visualstudio.com as TFS online and have created my code repo there.

在我的项目中,有一个包含几个子文件夹的文件夹,每个子文件夹都有几个图像(所有图像的总数约为6000个).

In my project there is folder that comprises several subfolders and eachsub folder has several images (the total of all images is like 6000).

签入代码时,我不想检入根文件夹(即图像子文件夹的父文件夹)及其内容吗?

When i check-in my code I do not want the root folder (i.e. the parent folder of image subfolders) and its content to be checkedin?

我在网上尝试了一些答案,但找不到任何准确的答案.

I tried online for some answers but cannot find anything accurate.

在此先感谢您的帮助.

Thanks in advance for your help.

推荐答案

通过将名为.tfignore的文本文件放在要应用规则的文件夹中,可以配置忽略哪些类型的文件. .tfignore文件的作用是递归.但是,您可以在子文件夹中创建.tfignore文件,以覆盖父文件夹中.tfignore文件的影响.

You can configure which kinds of files are ignored by placing text file called .tfignore in the folder where you want rules to apply. The effects of the .tfignore file are recursive. However, you can create .tfignore files in sub-folders to override the effects of a .tfignore file in a parent folder.

要创建文件,最简单的方法是使用自动自动生成的.tfignore文件,请按照以下步骤操作:

To create the file, the easiest way is using the auto automatically generated .tfignore file, follow below steps:

  1. 在待更改"页面的排除的更改"部分中,选择 检测到的更改链接.
  1. In the Pending Changes page, in the Excluded Changes section, choose the Detected changes link.

出现提升候选者更改"对话框.

The Promote Candidate Changes dialog box appears.

  1. 选择一个文件,打开其上下文菜单,然后选择忽略此本地文件" 项目,按扩展名忽略,按文件名忽略或按文件夹忽略.
  1. Select a file, open its context menu, and choose Ignore this local item, Ignore by extension, Ignore by file name, or Ignore by folder.

  1. 选择确定"或取消"以关闭促进候选人更改"对话框 框.
  2. .tfignore文件出现在 待更改页面.您可以打开此文件并对其进行修改以符合 您的需求.
  1. Choose OK or Cancel to close the Promote Candidate Changes dialog box.
  2. A .tfignore file appears in the Included Changes section of the Pending Changes page. You can open this file and modify it to meet your needs.

更多信息,请从MSDN链接中检查自定义版本控制会忽略哪些文件:

More info please check the Customize which files are ignored by version control from MSDN Link:Add files to the server

这篇关于从在线检入TFS中排除文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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