忽略来自挂起的更改某些文件 [英] Ignore certain file from pending changes
问题描述
下面是我的问题。我从溶液中某些文件(让我们说的Web.config),我已经改变了,绝不会想要签入,因为变化是指我的机器而已。有没有办法在TFS说忽略的变化在一定的文件,并从挂起的更改窗口中删除它。当然,我可以跳过在每次签这个文件,但总有一个变化忘记和办理入住手续的错误。例如,有一个类似的忽略列表中AnkhSVN的。
Here is my problem. I have a certain files from the solution (let's say Web.config) that I've changed and will never want to check-in since the changes are referring to my machine only. Is there a way to say in TFS to ignore changes in a certain file and remove it from pending changes window. Of course, I can skip this file in every check-in, but there is always a change to forget and check-in by mistake. For example, there is a similar ignore list in AnkhSVN.
推荐答案
的某些部分{应用程序,网页}的.config
文件可以被委派到其他文件。值得注意的是<的ConnectionStrings>
Some parts of {app,web}.config
files can be delegated to another file. Notably <connectionStrings>
.
在你的的app.config
或的web.config
:
<connectionStrings configSource="LocalConnectionStrings.config" />
在 LocalConnectionStrings.config
有(&LT;的ConnectionStrings&GT;
是根元素):
in LocalConnectionStrings.config
have (<connectionStrings>
is the root element):
<connectionStrings>
<!-- For the application's operations. -->
<add name="Application"
connectionString="Data Source=server;Initial Catalog=database;Integrated Security=True;Network Library=dbmssocn"
providerName="System.Data.SqlClient" />
</connectionStrings>
因此,每个开发者都有一个 LocalConnectionStrings.config
这是在项目中,而不是在源代码控制设置自己的私人设置,而 {网站,应用程序的.config}
已共享设置。不幸的是这仅适用于一组定义的系统配置元素的限制。
Thus each developer has a LocalConnectionStrings.config
which is in the project, but not in source control set with their private settings while the {web,app}.config
has shared settings. Unfortunately this only works with a limited set of system defined configuration elements.
这篇关于忽略来自挂起的更改某些文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!