Visual Studio 2015 Update 2团队资源管理器缺少'排除' [英] Visual Studio 2015 Update 2 Team Explorer Missing 'Exclude'

查看:432
本文介绍了Visual Studio 2015 Update 2团队资源管理器缺少'排除'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在Visual Studio 2015的Team Explorer部分使用Git集成。



我的解决方案中有许多配置文件需要修改为了让应用程序在本地运行,但我不想提交这些更改。



在VS2015 Update 1中,更改部分有一个排除选项我可以选择修改后的配置文件并将它们从一组更改中排除。那些文件不会出现在修改后的文件列表中,因此它们将被排除在未来的提交之外。



昨天我安装了更新2,现在排除选项已经消失。我什至不能看到一个'忽略',所以现在我不得不手动选择修改后的文件,并且每次都进行阶段化,现在这是一个额外的步骤,并且有可能让我偶然犯下本地配置更改。我意识到,为即将提交的文件建立一个暂存区域是常态,但VS的默认区域只是提交所有内容。如果我想排除配置文件,那么我需要暂存其他文件然后提交。

有没有办法使用exclude选项取回以前的功能,或是否会忽略VS Git集成中的配置文件。我真的不想将配置文件添加到Git忽略列表中,因为有时我会合法地更改这些文件并想提交它们。

解决方案 div>

Visual Studio现在遵循Git术语而不是TFS源代码控制Include / Exclude。在Git中,默认情况下您的更改未被暂存。从现在起VS也是这样,你可以右键点击你想要收集的文件来进行下一次提交并选择Stage。一旦你创建了一些文件,你可以通过 Commit Staged 按钮来提交这些分步文件(标题从 Commit All 在你至少放置一个文件之后)。

作为一个快捷方式,当你想立即提交每个修改过的文件 - 并且所有的文件最初都是未分区的 - 你可以使用全部提交按钮一次点击即可完成提交。

首先让我感到惊讶。但了解Git术语,它完全有意义。包含/排除来自原始的TFS源代码控制机制,它也有相似的用途,但对于那些新到VS但知道Git的人来说,这可能会令人困惑。


I have been using the Git integration from within the Team Explorer section in Visual Studio 2015.

I have an number of config files in my solution that require modifications in order for the application to run locally but I don't want to commit those changes.

In VS2015 Update 1 there was an 'exclude' option in the 'Changes' section of the Git integration that I could select the modified config files and exclude them from the set of changes. Those files would then not appear in the list of modified files going forward so they stayed excluded for future commits.

Yesterday I installed Update 2 and now that exclude option has gone. I can't even see an 'ignore' so now I have to manually select the modified files and stage them each time which is now an extra step and has potential for me committing the local config changes by accident. I realise that having a staging area for the files about to be committed is the norm but the default for VS is to just commit everything. If I want to exclude the config files then I need to stage the other files and then commit.

Is there a way of getting back the previous functionality with the exclude option or failing that of ignoring the config files within the VS Git integration. I don't really want to add the config files to the Git ignore list because sometimes I do change those files legitimately and want to commit them.

解决方案

Visual Studio now follows the Git terminology instead of the TFS source control Include/Exclude. In Git your changes are un-staged by default. From now on that's the case in VS too, and you can right click on the files you want to gather for the next commit and select "Stage". Once you staged some files, you can commit these staged files exclusively by Commit Staged button (the caption changes from Commit All after you stage at least one file).

As a shortcut however, when you want to commit every changed files at once - and all of them are unstaged initially - you can stage and commit them with one click with Commit All button.

First this surprised me. But knowing the Git terminology it totally make sense. Include/Exclude comes form the original TFS source control mechanisms, it served similar purpose, but it could have been confusing for those who where new to VS but knew Git.

这篇关于Visual Studio 2015 Update 2团队资源管理器缺少'排除'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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