我可以仅克隆存储库的最新变更集,而不克隆整个历史记录吗? [英] Can I clone just the latest changesets of a repository instead of the entire history?

查看:91
本文介绍了我可以仅克隆存储库的最新变更集,而不克隆整个历史记录吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用一个hg存储库,该存储库具有数百万行代码和成千上万个变更集.可以想象,这确实减慢了汞和龟甲的生长速度.

I have to work with an hg repository that has millions of lines of code and hundreds of thousands of changesets. As you can imagine, this really slows down mercurial and TortoiseHg.

是否可以创建仅包含最新的数千个变更集的本地存储库?

Is it possible for me to create a local repository that only has the latest few thousand changesets?

这不仅有望使事情运行起来更加轻松,而且还可以为我节省一些硬盘空间.

Not only would this hopefully make things run snappier, but it might also save me some hard drive space.

推荐答案

不可以,但是您可以优化本地克隆.看看我对 https://stackoverflow.com/a/19294645/479199 的回答.

No you can't, but you can optimise your local clone. Have a look at my answer to https://stackoverflow.com/a/19294645/479199.

浅层克隆上已有一些工作,但仍在进行中(并且似乎没有太多进展):

There has been some work on shallow clones, but it's still very much a work in progress (and there doesn't seem to have been much progress):

https://www.mercurial-scm.org/wiki/ShallowClone

这篇关于我可以仅克隆存储库的最新变更集,而不克隆整个历史记录吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆