hgignore:需要忽略除一个 .lib 文件之外的所有文件

发布于 2024-12-14 02:04:07 字数 318 浏览 4 评论 0原文

对于我的班级项目,我的团队正在使用 hg 一起工作,我从 这个问题,有一些补充。但有一个问题。我有一个运行代码所需的 .lib 文件,我希望将其保存在存储库中。

由于 .hgignore 使用 glob 我也是,那么我如何允许文件 comp345_dnd/RollPlay.lib (根文件夹包含 comp345_dnd)进入/观看,而 *.lib 被忽略?

For my class project my team is using hg to work together and I made the ignore file from the checked answer on from this question, with a few additions. There's a problem though. I have a .lib file necessary to making the code run and I want it kept in the repository.

Since that .hgignore is using glob I am too, so how would I allow the file comp345_dnd/RollPlay.lib (root folder contains comp345_dnd) to be in/watched while *.lib is ignored?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

半透明的墙 2024-12-21 02:04:08

只需手动对特定文件执行 hg add (不带任何通配符),例如:

hg add /path/to/file

这会覆盖 .hgignore 文件并将该文件添加到存储库。

Just manually do hg add on the specific file (without any wildcards) e.g.:

hg add /path/to/file

This overrides the .hgignore file and adds the file to the repository.

顾忌 2024-12-21 02:04:08

引用 Matt Mackall 关于 Mercurial-devel 列表的旧帖子Mercurial 将添加在命令行上明确指定的任何文件,无论忽略规则如何。

to quote Matt Mackall in an old post on the mercurial-devel list: Mercurial will add any -files- explicitly specified on the command line, regardless of the ignore rules.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文