Git 克隆挂起 - 有没有办法继续克隆?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12209747/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git clone hangs - is there a way to continue cloning?
提问by taro
Sometimes my git clone
command hangs:
有时我的git clone
命令挂起:
git clone -v [email protected]:user/repo.git
Cloning into repo...
remote: Counting objects: 105350, done.
remote: Compressing objects: 100% (28919/28919), done.
Receiving objects: 13% (14481/105350), 6.84 MiB | 46 KiB/s
There is no progress for ten minutes.
十分钟没有任何进展。
Is there any way to continue cloning using a partially cloned repository if I stop the current process?
如果我停止当前进程,有没有办法使用部分克隆的存储库继续克隆?
采纳答案by kardan
As of now (git version 1.7.10.4) this is not supported yet.
截至目前(git 版本 1.7.10.4)尚不支持此功能。
You can read whythe developers disagreed on how to implement. There were debates in 2009 an 2011 but no implementation so far as this seems to be tough.
您可以阅读为什么开发人员不同意如何实施。2009 年和 2011 年曾有过争论,但目前没有实施,因为这似乎很困难。
It could be so easy (but it unfortunately is not):
它可能如此简单(但不幸的是它不是):
git clone --continue
As one knows: Questions or comments for the Git community can be sent to the mailing list by using the email address [email protected]. Bug reports should be sent to this mailing list. Just go ahead and ask there again :)
众所周知:Git 社区的问题或评论可以通过使用电子邮件地址 [email protected] 发送到邮件列表。错误报告应该发送到这个邮件列表。去那里再问一次:)
Git does not support resumable clones. That feature, it turns out, is pretty tricky to implement properly. One workaround is to download a bundle over http and then fetch the remaining bits and pieces with git. But many repository admins do not provide bundles for you to download. This service aims to fill that gap: give us the URL to a repository and we'll create a bundle which you can download through http. [ bundler.caurea.org ]
Git 不支持可恢复的克隆。事实证明,该功能很难正确实现。一种解决方法是通过 http 下载一个包,然后使用 git 获取剩余的部分。但是许多存储库管理员不提供捆绑包供您下载。该服务旨在填补这一空白:向我们提供存储库的 URL,我们将创建一个包,您可以通过 http 下载该包。[ bundler.caurea.org ]
I tried this for qtmoko.git and looks works quite well. Another option is to ask upstream/github to implement "git bundle", there are howtos (How to use git-bundle for keeping development in sync?) for this as well.
我为 qtmoko.git 尝试了这个,看起来效果很好。另一种选择是要求上游/github 实现“git bundle”,对此也有 howtos(如何使用 git-bundle 保持开发同步?)。