简体   繁体   English

如何忽略HG中的某些文件夹?

[英]How to ignore certain folders in HG?

I have my project folder - Project. 我有我的项目文件夹-Project。 In Project I have other sub projects - SUBPROJECT1, SUBPROJECT2, SUBPROJECT3. 在项目中,我还有其他子项目-SUBPROJECT1,SUBPROJECT2,SUBPROJECT3。

In each sub project I have folders, among which I have BIN and OBJ. 在每个子项目中,我都有文件夹,其中有BIN和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. 但是,我希望后者被忽略,这样在我提交时,我不会对BIN和OBJ进行任何更改。 How can I do that? 我怎样才能做到这一点?

You'll need to edit your .hgignore file, and include the following lines: 您需要编辑.hgignore文件,并包括以下几行:

glob:bin\
glob:obj\

You probably want at least these other things as well: 您可能至少还需要其他这些东西:

glob:*.user
glob:*.suo
glob:_ReSharper.*\

There's other examples out there of more complete .hgignore files. 还有其他示例,其中包含更完整的.hgignore文件。

使用.hgignore

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM