我如何克隆一个不可靠的连接上一个大的Git仓库? [英] How do I clone a large Git repository on an unreliable connection?

查看:118
本文介绍了我如何克隆一个不可靠的连接上一个大的Git仓库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要克隆的LibreOffice。从官方网站,这是写了些什么:

I want to clone LibreOffice. From the official website, this is what's written:

我们所有的源$ C ​​$ C是git的托管

All our source code is hosted in git:

复制: $混帐混帐克隆://anongit.freedesktop.org/libreoffice/core #(浏览)

克隆(HTTP): $ git的克隆http://anongit.freedesktop.org/git/libreoffice/core.git #慢

Clone (http): $ git clone http://anongit.freedesktop.org/git/libreoffice/core.git # slower

tar包: http://download.documentfoundation.org/libreoffice/src/

请找到最新版本(通常接近底部)

please find the latest versions (usually near the bottom)

现在,当我混帐的bash写这个命令来克隆,它开始取。但库是如此之大,小时后我失去连接了几秒钟,它回退下载,而我什么也没有。

now, when I write this command in git bash to clone, it starts fetching. But the repository is so big that after hours I lose connectivity for a few seconds, it rolls back the download, and I get nothing.

有没有什么方法可以让我即使发生中断顺利下载仓库?

Is there any way I can download the repository smoothly even if interruptions occur?

P.S。我的Git的新用户,我使用1 MB DSL互联网连接。该库必须超过1 GB。

P.S. I am a new user of Git and I use a 1 MB DSL internet connection. The repository must be over 1 GB.

推荐答案

该库是通过 HTTP 的协议(即哑协议)访问这里:<一href=\"http://anongit.freedesktop.org/git/libreoffice/core.git\">http://anongit.freedesktop.org/git/libreoffice/core.git.

The repository is accessible via the http protocol (aka dumb protocol) here: http://anongit.freedesktop.org/git/libreoffice/core.git.

您可以在这里下载使用一切的wget 或其他下载管理器,你就会有一个版本库的克隆。在此之后,您重命名 core.git 目录以的.git ,并使用以下命令来告诉混帐远程网址:

You can download everything here with wget or another download manager, and you'll have a clone of the repository. After that, you rename the directory from core.git to .git, and use the following command to tell git about the remote url:

$ git remote add remote http://anongit.freedesktop.org/git/libreoffice/core.git
$ git reset --hard HEAD

这篇关于我如何克隆一个不可靠的连接上一个大的Git仓库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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