如何在意外挂断后恢复git pull / clone? [英] How to resume a git pull/clone after a hung up unexpectedly?

查看:492
本文介绍了如何在意外挂断后恢复git pull / clone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我做一个git pull / clone到某个仓库(主要是github仓库)。
有时几分钟后下载崩溃。



这是一个日志。

  remote:计数对象:2284,完成。 
remote:压缩对象:100%(713/713),完成。
致命:远程端意外挂断| | 5 KiB / s
致命:早期EOF
致命:索引包失败

在我的过程中,我注意到我已经提取了大约4 MB的对象。
当我重新开始这个过程时,它从头开始。
我的互联网连接很糟糕,有时它会崩溃,我意外断开连接。



我的问题是:有什么办法可以恢复pull / clone来拯救那些4 MB我已经提取,而不是重新启动?

解决方案

如果拉起来,它不会写任何改变你的文件系统。这是因为,如果它会,你的本地存储库不会处于稳定状态。



无法恢复拉/克隆。所以你唯一的选择就是再次拉/克。

I do a git pull/clone to some repository (mainly github ones). Sometimes after a few minutes the download crashes.

Here is a log.

remote: Counting objects: 2284, done.
remote: Compressing objects: 100% (713/713), done.
fatal: The remote end hung up unexpectedlyiB | 5 KiB/s      
fatal: early EOF
fatal: index-pack failed

In my following of the process, i have noticed that i have already fetched about 4 MBs of objects. When i start the process again, it starts from the beginning. My Internet connection sucks, some times it crashes and i get disconnected unexpectedly.

My question is: Is there any way to resume the pull/clone to rescue those 4 MBs i have already fetched, and not to start again?

解决方案

If a pull hung up, it will not write any changes to your filesystem. This is because, if it would, your local repository would not be in a stable state.

There is no way to resume a pull/clone. So your only choice is to pull/clone again.

这篇关于如何在意外挂断后恢复git pull / clone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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