Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.hgignore不为mercurial工作_Mercurial_Hgignore - Fatal编程技术网

.hgignore不为mercurial工作

.hgignore不为mercurial工作,mercurial,hgignore,Mercurial,Hgignore,我在php项目中使用mercurial,而我的.hgignore文件不起作用。它应该放在.hg/文件夹中,不是吗 .hgignore 我认为,仅仅从内存来看,hgignore需要存在于存储库根目录中。您当然不需要告诉它忽略.hg文件夹,这或多或少会自动发生。您为什么不想在您的repo中使用忽略和访问设置?页面中没有提到该文件在.hg中: .hgignore文件位于工作目录中,.hg文件夹旁边 无论您想忽略什么文件,都必须确保它们尚未被跟踪。如果是,您需要先删除它们,然后将它们添加为私有(非跟踪)

我在php项目中使用mercurial,而我的
.hgignore
文件不起作用。它应该放在
.hg/
文件夹中,不是吗

.hgignore
我认为,仅仅从内存来看,hgignore需要存在于存储库根目录中。您当然不需要告诉它忽略.hg文件夹,这或多或少会自动发生。您为什么不想在您的repo中使用忽略和访问设置?

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

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


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

内存?我重新启动了mamp和mercurial。。。还是一样的问题:/i正在编辑.htaccess文件,mercurial正在进行更改:/ps,对不起,我不理解您的问题Johannes Rudolph是正确的。.hgignore应该放在存储库根目录中,而不是放在.hg目录中。您已经添加的任何文件都将覆盖.hgignore。不能同时跟踪和忽略文件,如果跟踪,则会覆盖忽略。他还正确地指出.hg不需要在.hgignore文件中——这是automatic.artmania:Mercurial分别将这些设置存储在.hgignore和.htacses中。如果您将它们放在忽略列表中,如果之前没有添加它们,mercurial将不会跟踪它们。@Ry4an:没错,请随意编辑我的答案并添加重要部分。啊哈,是的!我应该对.hgignore中定义的文件执行“从存储库中删除”!刚做了,现在没事了!工作正常:)感谢在不实际删除文件的情况下取消跟踪,
hg forget
是您的朋友!
/.hg/.hgignore file

# Allow *. syntax
syntax:glob

# Ignore these files
.hgignore
.htaccess
.hg/*