有趣的是,当为 Mercurial 添加 .hgignore 时,该文件本身显示为“?”汞状态?
正常吗?那么您只需将 \.hgignore
添加到列表中即可忽略自身?
Is it normal? So you just need to add \.hgignore
to the list to ignore itself?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,但您不想忽略
.hgignore
文件。当新人查看您的存储库时,您不希望他们获得您的忽略文件列表吗?相反,执行hg add .hgignore; hg 提交
。底线:
.hgignore
像存储库中的任何其他文件一样被跟踪。Yes, but you don't want to ignore the
.hgignore
file. When a new person checks out your repository, don't you want them to get your ignored-files list? Instead, dohg add .hgignore; hg commit
.Bottom line:
.hgignore
is tracked like any other file in the repository.只是为了补充 Borealid 的答案:
hg status
中的?
表示该文件位于工作目录中,但未被跟踪。您通常会在以下两种情况之一中看到它:hg add
编辑。在#1 中,您需要将文件或文件类型添加到
.hgignore
。在#2 中,您想要hg add
文件。对于.hgignore
,它是#2。Just to supplement Borealid's answer:
?
inhg status
means that the file is in the working directory, but not tracked. You usually see it in one of two situations:hg add
ed it yet.In #1, you'll want to add the file or file type to
.hgignore
. In #2, you want tohg add
the file. In the case of.hgignore
, it's #2.