如何使git clone具有多个线程更快? [英] How to make git clone faster with multiple threads?

查看:431
本文介绍了如何使git clone具有多个线程更快?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我到github的互联网速度从未如此快,并且以50kb/s的速度徘徊(我的互联网速度为20兆比特,虽然不是非常快,但仍然比这快得多).根据我的估计,该存储库的容量为多GB,因此将花费很长时间.

My internet speed to github was never fast, and it's lingering at 50kb/s (my internet speed is 20mbit which is not very fast but still much faster than this). The repository is multi-gb by my estimates, so it'll take a very long time.

git是否支持使用多线程这样我就可以最大限度地利用互联网速度?

Does git support downloading the objects using multiple-threads so I can max-out my internet speed?

推荐答案

您至少可以尝试使用浅层克隆来缓解该问题(这意味着不克隆所有历史记录):

You can at least try and mitigate the issue, with a shallow clone (meaning not cloning the all history):

git clone --depth 1 <repository>

请确保git 1.9+,如我在"中所解释的那样,git clone --depth 1(浅克隆)比它有用吗?出来吗?".

Make sure to have a git 1.9+, as I explained in "Is git clone --depth 1 (shallow clone) more useful than it makes out?".

注意:Git 2.5(2015年第二季度)甚至支持单个提取提交!请参阅"从远程git存储库中提取特定提交".

Note: Git 2.5 (Q2 2015) even supports a single fetch commit!See "Pull a specific commit from a remote git repository".

这篇关于如何使git clone具有多个线程更快?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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