“从源代码管理中排除"发生了什么?在 VS2012 [英] What happened to "Exclude from Source Control" in VS2012

查看:28
本文介绍了“从源代码管理中排除"发生了什么?在 VS2012的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从 TFS 2012 源代码管理中排除代码文件夹中的一些文件.

I want to exclude some of the files in code folders from TFS 2012 source control.

在 VS2012 之前,这是通过源代码管理资源管理器"的右键单击菜单中可用的从源代码管理中排除"命令来完成的.但是在VS2012中找不到.

Before VS2012 this was done by the "Exclude from source control" command available in "Source Control Explorer"s right-click menu. But in VS2012 I can not find it.

有人知道它在哪里吗?

(顺便说一下,我使用的是本地"工作区.)

(I am using a "Local" workspace by the way.)

推荐答案

当您在团队资源管理器"窗格中单击检测到的更改"时,将打开促进候选更改"窗口.此窗口允许您在检测到的更改中进行选择,并将它们提升为源控制项.

When you click on "Detected Changes" in the Team Explorer pane, "Promote Candidate Changes" window opens. This window allows you to select among detected changes and promote them to a source controlled item.

在这个 Promote Candidate Changes" 窗口中,您选择一个文件(或使用 Shift 多选文件),右键单击它并弹出一个上下文菜单,其中包含一个 "忽略此本地项目"选项.如果您单击它,选定的文件将从源代码管理中排除.

In this "Promote Candidate Changes" window, you select a file (or multi select files with Shift), right-click on it and a context menu pops up which contains an "ignore this local item" option. If you you click on it, selected files are excluded from source control.

Visual Studio 将名为.tfignore"的文件添加到源代码管理映射根目录中,其中包含要被源代码管理忽略的所有文件的名称.(之前的 TFS 版本没有生成这个文件,但它们都是服务器工作区.由于这是一个本地"工作区,需要在工作区中保留要忽略的文件名)

Visual Studio adds a file named ".tfignore" to the source control mapping root, which contains names of all files to be ignored by source control. (Previous TFS versions did not produce this file but they were all server workspaces. Since this is a "Local" workspace, filenames to be ignores need to be kept in the workspace)

这篇关于“从源代码管理中排除"发生了什么?在 VS2012的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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