.hgignore 不适用于 Mercurial
我将 Mercurial 用于 php 项目,但我的 .hgignore
文件无法正常工作。它应该放在 .hg/
文件夹中,不是吗?
.hgignore
/.hg/.hgignore file
# Allow *. syntax
syntax:glob
# Ignore these files
.hgignore
.htaccess
.hg/*
I use mercurial for php projects and my .hgignore
file is not working. It's supposed to be placed in the .hg/
folder, isn't it?
.hgignore
/.hg/.hgignore file
# Allow *. syntax
syntax:glob
# Ignore these files
.hgignore
.htaccess
.hg/*
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
.hgignore 页面中没有提及该文件的内容
.hg
:无论您想忽略什么文件,您都必须确保它们尚未被跟踪。如果是,您需要先删除它们,然后将它们添加为私有(非跟踪)文件。
There is no mention in the .hgignore page of that file being inside
.hg
:And whatever file you want to ignore, you must be sure they are not already tracked. If they are, you need to remove them first, and then add them as private (non-tracked) file.
根据记忆,我认为 .hgignore 需要位于存储库根目录中。您当然不需要告诉它忽略 .hg 文件夹,这或多或少会自动发生。您有什么理由不希望在存储库中使用忽略和访问设置?
Just from memory I think .hgignore needs to live in the repository root. You certainly don't need to tell it to ignore the .hg folder, that will happen more or less automatically. Any reason why you don't want your ignore and access settings in your repo?