Mercurial hgignore 文件不会忽略某个文件
我有一个名为 A/B/SomeFile.dll 的文件,该文件由 Visual Studio 在每次编译时生成。
在我的 .hgignore 文件中,我已经包含了:
SomeFile.dll
A/B/SomeFile.dll
*SomeFile.dll
然而,每次重新编译都会使 Mercurial 认为该文件已被修改。 (这不是本地 hgignore 文件,而是最新提交的文件)
我已经三次验证它拼写正确并且情况完全相同。现在我迷路了。
I have a file named A/B/SomeFile.dll that gets generated by visual studio on each compile.
In my .hgignore file I have included:
SomeFile.dll
A/B/SomeFile.dll
*SomeFile.dll
and yet, every recompile makes mercurial think the file has been modified. (this is not a local hgignore file, but what it is the latest committed file)
I have triple verified it is spelled correctly and the cases are the exact same. Now I am lost.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
确保在将文件添加到 .ignore 文件之前没有将其添加到存储库。如果这样做,您将需要从存储库中“hg删除”它,然后提交。
希望有帮助。
Make sure you didn't add the file to the repo before you added it to .ignore file. If you did, you will need to "hg remove" it from the repository, then commit.
Hope it helps.
您需要停止在 Mercurial 中跟踪该文件;对于已在存储库中跟踪的文件,
.hgignore
将被忽略。You need to stop tracking the file in mercurial;
.hgignore
is ignored for files already tracked in the repository.