克隆不带 .hg 的 Mercurial 存储库
如何在没有 .hg
文件夹的情况下克隆 Mercurial 存储库以节省时间(项目很大)?我只需要提示文件。
How can I clone a Mercurial repository without the .hg
folder to save time (the project is big)? I only need the tip files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
.hg
目录存储完整的存储库信息。也就是说,有关存储库跟踪的所有文件及其修订的信息。至于存储,它通常非常高效,因为它是使用二进制差分进行压缩的。当您克隆存储库时,唯一克隆的是 .hg 目录。从
.hg
检索克隆后您将获得工作副本。如果您想要存储的只是存储库信息(例如在服务器上),则可以使用
hg update null
删除工作副本。如果您想创建不带修订信息的存储库克隆,可以使用
hg archive
命令(请参阅下面的参考资料)。请注意,此副本只是一个“工作副本”(使用一些常见的 svn 术语)。你不能承诺,也不能用它做任何其他善变的操作。The
.hg
directory is what stores your complete repository information. That is, information about all your files and their revisions tracked by the repository. As for storage, it usually is pretty efficient since it is compressed using binary differerencing.When you clone a repository, the only thing that is cloned is the .hg directory. The working copy you will get after the clone is retrieved from that
.hg
.If all you want to store is the repository information (say on a server), you can remove the working copy with
hg update null
.If you want to create a clone of your repository without the revision information, you can use the
hg archive
command (see reference below). Be aware that this copy is just a "working copy" (to use some common svn terminology). You can't commit, nor do any other mercurial operation with it.