忽略存储库中的跟踪项目
我的网站有一个 mercurial
项目。我有符号链接
(Mac OS X 别名
)很多文件从这里`到其他地方。我也犯了一个错误,在我的存储库中添加并提交了所有别名。
但是现在我想让它们不被跟踪,所以我在 .hgignore
中添加了一个条目 -
syntax:glob
*.pdf
*alias
[... snipped ...]
但当我执行 hg status
时我仍然看到它们
$ hg status
M documents/.../x alias
M documents/.../y alias
M documents/.../z alias
[... snipped ...]
I have a mercurial
project of my website. I have symlinked
(Mac OS X aliases
) lot of files from here `to elsewhere. I made a mistake to add and commit all the aliases in my repository too.
However now I want to keep them untracked, so I added an entry in my .hgignore
-
syntax:glob
*.pdf
*alias
[... snipped ...]
But I still see them when I do hg status
$ hg status
M documents/.../x alias
M documents/.../y alias
M documents/.../z alias
[... snipped ...]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要告诉 hg 删除或忘记这些文件,因为现在它们仍然在您的存储库中,并且 hg 不会忽略它已经跟踪的文件 - 它只会忽略尚未跟踪的文件。
You need to tell hg to remove or forget these files, because right now they are still in your repository, and hg won't ignore files that it's already tracking--it will just ignore files that aren't already tracked.