.hgignore不适合mercurial

des*_*ing 11 mercurial hgignore

我使用mercurial进行php项目,我的.hgignore文件无效.它应该放在.hg/文件夹中,不是吗?

.hgignore

/.hg/.hgignore file

# Allow *. syntax
syntax:glob

# Ignore these files
.hgignore
.htaccess
.hg/*
Run Code Online (Sandbox Code Playgroud)

Von*_*onC 31

.hgignore页面中没有提到该文件在里面 .hg:

.hgignore文件位于工作目录中,位于该.hg文件夹旁边.

无论您想忽略哪个文件,都必须确保它们尚未被跟踪.如果是,则需要先删除它们,然后将它们添加为私有(非跟踪)文件.

  • 啊哈!我应该为.hgignore中定义的文件制作“从存储库中删除”!刚做到,现在很好!运作良好:)谢谢 (2认同)
  • 要取消跟踪文件而不实际删除它,“hg忘记<文件名>”是你的朋友! (2认同)