如何忽略HG中的某些文件夹? [英] How to ignore certain folders in HG?
问题描述
我有我的项目文件夹-Project.在项目"中,我还有其他子项目-SUBPROJECT1,SUBPROJECT2,SUBPROJECT3.
I have my project folder - Project. In Project I have other sub projects - SUBPROJECT1, SUBPROJECT2, SUBPROJECT3.
在每个子项目中,我都有文件夹,其中有BIN和OBJ.但是,我希望后者被忽略,这样在我提交时,我不会对BIN和OBJ进行任何更改.我怎样才能做到这一点?
In each sub project I have folders, among which I have BIN and OBJ. However, I want the latter to be ignored such that when I commit I don`t have the changes made to BIN and OBJ. How can I do that?
推荐答案
您需要编辑.hgignore
文件,并包括以下几行:
You'll need to edit your .hgignore
file, and include the following lines:
glob:bin\
glob:obj\
您可能至少还需要其他这些东西:
You probably want at least these other things as well:
glob:*.user
glob:*.suo
glob:_ReSharper.*\
还有其他示例,其中包含更完整的.hgignore
文件.
There's other examples out there of more complete .hgignore
files.
这篇关于如何忽略HG中的某些文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!