Mercurial 中克隆和复制的区别
将 .hg 目录复制到另一个目录与 Mercurial 中的克隆相同(使用 TortoiseHg,尽管我认为这无关紧要),还是 Mercurial 中的克隆命令在此过程中做了一些特殊的事情?
Is copying the .hg directory to another directory the same as cloning in Mercurial (using TortoiseHg although I think that's irrelevant) or does the cloning command in Mercurial do something special during that process?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
几乎是一样的。克隆做了一些不同的事情,这些都不是必需的,但其中一些很酷:
最后一个非常酷。这意味着,如果我有一个 200GB 的存储库,并且执行
clone -U src dest
,我将获得一个完全不使用磁盘空间的完整克隆!如果我跳过-U
,我会得到一个占用空间的工作副本,并且当两个克隆开始分歧时,新的克隆开始占用空间,但基本的clone -U
code> 在现代文件系统上是即时的并且不占用磁盘空间。副本则不然(副本也能正常工作)。It's almost the same. Cloning does a few things different, none of which are required, but some of which are cool:
That last one is pretty cool. It means that if I have a 200GB repo and I do a
clone -U src dest
I get a full clone that uses no diskspace at all! If I skip the-U
I get a working copy that takes up space, and as the two clones start to diverge the new one starts taking up space, but a basicclone -U
is instantaneous and disk-space-free on modern file systems. That's not true of a copy (which does work just fine too).