文章大纲

Git系列之git clone:要皮还是要心,随你要

2020-03-27 16:59:19

最近直接git clone laravel项目,发现不可行了,总是自己中断了,报如下错误:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed


网上说,这是由于laravel 项目commit越来越多,项目所占空间越来越庞大所致。


要皮:

通过如下命令,就可以获取laravel只包含最近一次commit的版本代码。

git clone https://github.com/laravel/laravel.git --depth=1


要心:

这里我用“心”来形象的描述分支部位。

上面--depth=1命令,默认下载的是master分支。


如果要下载指定的分支,用如下命令:

git clone -b 分支名 --depth=1







我要评论
评论列表