visual-studio 用于 Visual Studio 2010 项目的 Mercurial .hgignore
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4095696/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Mercurial .hgignore for Visual Studio 2010 projects
提问by Shady M. Najib
Not to be confused with Mercurial .hgignore for Visual Studio 2008 projects
不要与用于 Visual Studio 2008 项目的 Mercurial .hgignore混淆
I was asking whether if that same file can be reused for Visual Studio 2010, or some other extensions, etc should be added to it, & why?
我在问是否可以为 Visual Studio 2010 重复使用相同的文件,或者应该向其中添加一些其他扩展等,为什么?
回答by Thomas Weller
The new things are related to MSTest stuff. This is the one that I use:
新事物与 MSTest 相关。这是我使用的一个:
# use glob syntax
syntax: glob
*.obj
*.pdb
*.user
*.aps
*.pch
*.vspscc
*.vssscc
*_i.c
*_p.c
*.ncb
*.suo
*.tlb
*.tlh
*.bak
*.[Cc]ache
*.ilk
*.log
*.lib
*.sbr
*.scc
*.DotSettings
[Bb]in
[Dd]ebug*/**
obj/
[Rr]elease*/**
_ReSharper*/**
NDependOut/**
packages/**
[Tt]humbs.db
[Tt]est[Rr]esult*
[Bb]uild[Ll]og.*
*.[Pp]ublish.xml
*.resharper
*.ncrunch*
*.ndproj
回答by Lasse V. Karlsen
I feel that it is important to know every piece of information about my repositories, so I never copy and paste the .hgignore file from one repo to the next, instead I always build them as I go.
我觉得了解有关我的存储库的每条信息很重要,因此我从不将 .hgignore 文件从一个存储库复制并粘贴到下一个存储库,相反,我总是边走边构建它们。
This is easy with TortoiseHg, as the Commit window will list all untracked files, and a simple right-click will allow me to add patterns to ignore those files. This way I always discover new files that I may or may not want to keep.
这对于 TortoiseHg 来说很容易,因为提交窗口将列出所有未跟踪的文件,一个简单的右键单击将允许我添加模式以忽略这些文件。通过这种方式,我总是会发现我可能想要或可能不想保留的新文件。
For instance, in the list published by Thomas, *.resharperis the last entry. This will prevent sharing the resharper settings per solution, as one of the options in the config dialog for ReSharper can be set to. In other words, if you want to ensure that all the developers are running with the same settings for a lot of the things ReSharper will help you with, that particular line can't be there.
例如,在 Thomas 发布的列表中,*.resharper是最后一个条目。这将阻止共享每个解决方案的 resharper 设置,因为 ReSharper 的配置对话框中的选项之一可以设置为。换句话说,如果您想确保所有开发人员都使用相同的设置运行 ReSharper 将帮助您完成的许多事情,那么该特定行就不能存在。
So my advice is this: Do it manually, you'll learn a thing or two about your project in the process.
所以我的建议是:手动操作,您将在此过程中了解有关项目的一两件事。

