Mercurial,仅忽略源所在的目标文件
我的(未来的)Mercurial 存储库中有相当多的对象 (.o) 文件。我有其中大多数的源代码,但有些是由合作者下载/提供的,而我没有源代码。当然,对二进制文件进行版本控制是不好的,但我想对一些我没有源代码的文件执行此操作(因为它们很少(如果有的话)被修改,而另一方面,我我自己无法再生它们)。
假设我有一种简单的方法来确定 .c 对应于 .o 如果存在(例如始终在同一文件夹中),那么有没有一种简单的方法可以实现此目的?
谢谢。
I have quite a few objects (.o) files in my (future) Mercurial repository. I have the source for most of them, but some were downloaded / provided by collaborators and I don't have the sources. Of course, versioning binary files is bad, but I'd like to do that for the few files for which I don't have the sources (given that they will rarely, if ever, be modified, and that on the other hand I cannot regenerate them myself).
Assuming that I have a simple way of determining where .c corresponding to a .o is if it exists (e.g. always in the same folder), is there an easy way to achieve this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以安全地将
*.o
文件添加到.hgignore
中,然后手动hg add
特定的*.o
文件到存储库进行跟踪。任何自动添加(例如hg addremove
或不带参数的hg add
)仍会忽略*.o
文件,但您可以手动添加任何被忽略的东西都会被跟踪。You can safely add
*.o
files to your.hgignore
, and then manuallyhg add
specific*.o
files to the repository for tracking. Any automatic adding (such ashg addremove
, orhg add
without an argument) will still ignore*.o
files, but you can manually add anything ignored and it will be tracked.