如何在一个不稳定的连接上完成一个大项目的git克隆? [英] How to complete a git clone for a big project on an unstable connection?

查看:499
本文介绍了如何在一个不稳定的连接上完成一个大项目的git克隆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图克隆LibreOffice代码库,但目前我的互联网连接速度约为300kbps,而且它只是稳定的。我可以随时获得连接,但是git克隆进程已经停止工作,并且没有办法让它再次运行。有没有办法让一个更具抗失败性的git克隆下载?



我认为我自己的一个选择是下载其他人的.git目录,但是这太过依赖于其他人,似乎并不是最好的解决方案。

解决方案

我认为这还没有准备好。有一个旧的GSoC页面,它计划实现您所需的功能。我最好的选择是,像你建议的那样下载它作为一个目录。我假设您可以通过其他协议恢复下载。


可重新启动的克隆



当克隆大型资料库(如KDE,Open Office,Linux内核

时,目前无法重新启动
中断克隆。在小管道的
端用户可能需要
相当多的时间来下载
数据,并且如果克隆在中间被
中断,则用户当前需要
从头开始,
再试一次。对于某些用户来说,这可能会导致
无法克隆大型
存储库。



目标:允许git-clone自动执行
resume以前的失败的下载
通过本地git://协议。
语言:C导师:Shawn Pearce
建议者:Shawn
皮尔斯皮尔曼







Update



随着浅层克隆( git clone --depth = 1 转换为完整的存储库。同时阅读答案中的评论作为浅层克隆可能并不总是有帮助的。


I am trying to git clone the LibreOffice codebase, but at the moment I have an internet connection of about 300kbps and it's just anything but stable. I can get the connection back any moment, but then the git clone process already stopped working, and no way to get it running again. Is there some way to have a more failure-resistant git clone download?

One option I considered myself is to download someone else's .git directory, but that is overly dependent of others and doesn't seem like the best possible solution to me.

解决方案

I don't think this is ready yet. There's an old GSoC page that which planned to implement your desired feature. My best bet is, like you suggested download it as a directory. I'm assuming you are able to resume downloads over other protocols.

Restartable Clone

When cloning a large repository (such as KDE, Open Office, Linux kernel) there is currently no way to restart an interrupted clone. It may take considerable time for a user on the end of a small pipe to download the data, and if the clone is interrupted in the middle the user currently needs to start over from the beginning and try again. For some users this may make it impossible to clone a large repository.

Goal: Allow git-clone to automatically resume a previously failed download over the native git:// protocol. Language: C Mentor: Shawn Pearce Suggested by: Shawn Pearce on gmane


Update

Along with the shallow cloning (git clone --depth=1) suggestion in one of the other answers it may be helpful if someone can make a bare repository for you if you can communicate with the provider. You can easily convert the bare repository to a full repository. Also read the comments in that answer as a shallow clone may not always help.

这篇关于如何在一个不稳定的连接上完成一个大项目的git克隆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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