Mercurial:一些与.hgignore有关的问题 [英] Mercurial: a few questions all related to .hgignore
问题描述
我使用.hgignore
文件已经很长时间了,它很好,最近又添加了一种新的文件类型来忽略.当运行汞状态"时,我注意到了这一点:
M .hgignore
因此Mercurial认为.hgignore
是需要跟踪的文件(如果它是项目的根目录).
现在我已经阅读了各种文档,但是我的要点并未得到特别解决,因此这里有一些非常详细的问题,希望可以帮助我弄清楚(很高兴有人回答可以引用并解决这三点[甚至并为每个问题简单回答是/否")):
-
.hgignore
应该位于项目的根目录吗? (我想应该可以看到开发人员可以从事多个项目,而每个项目都有不同的.hgignore要求) -
可以忽略
.hgignore
是Mercurial吗? -
如果可以忽略,则Mercurial应该忽略
.hgignore
(与上一个问题不同)
在 我认为我看到某些基于用户的IDE项目文件(我并不是说所有IDE项目文件仅针对每个用户,但绝对是某些用户)发生了奇怪的事情,但是这些用户却被忽略了.回滚到一个旧版本,在该版本中使用了旧的 您通常不会忽略.hgignore文件,因为您希望它成为存储库的一部分,因此所有用户最终都会使用它. 就回滚然后意外提交文件,您不应该-嗯,无论如何这确实可能发生.负责任地承诺. 对于您的其他问题: I've been working for a long time with a So Mercurial considers the Now I've read various docs but my points weren't specifically adressed so here are some very detailed questions which hopefully can help me figure this out (it would be great is someone answering could quote and address these three points [even with a simply yes/no answer for each question]): Should Can If it can be ignored, should In the case where I think I saw weird things happening with certain per-user IDE project files (I'm not saying all IDEs project files are per-user only, but some definitely are) that were supposed to be ignored, but then the user rolls back to an old version, where an old You don't generally ignore the .hgignore file because you want it to be part of the repository so all of your users end up with it. As far as rolling far back and then accidentally committing files you shouldn't - well, that really could happen at any point anyway. Commit responsibly. To your other questions: 这篇关于Mercurial:一些与.hgignore有关的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!.hgignore
不应忽略.hgignore
时突然突然回滚,会不会发生一些真正坏的事情? /p>
.hgignore
,然后突然提交了应该被忽略的文件,因为旧的.hgignore
没有排除这些文件.
.hgignore
file that was fine and recently added one new type of files to ignore. When running "hg status", I noticed this:M .hgignore
.hgignore
to be a file that needs to be tracked (if it's a the root of the project).
.hgignore
be at the root of the project? (I guess it should, seen that a developer can potentially be working on several projects which would all have different .hgignore requirements).hgignore
be ignored be Mercurial?.hgignore
be ignored by Mercurial (which is different than the previous question).hgignore
should not be ignored, can't some really bad thing happens if you suddenly rollback way earlier, when a really old and incomplete .hgignore
was used?.hgignore
gets used, and then suddenly files supposed to be ignored are committed because the old .hgignore
didn't exclude these.