V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
urmyfaith
V2EX  ›  GitHub

github 下载文件可以断点续传不?

  •  
  •   urmyfaith · 2015-02-27 11:11:42 +08:00 · 12593 次点击
    这是一个创建于 3356 天前的主题,其中的信息可能已经有所发展或是发生改变。

    github 下载文件可以断点续传不?

    git仓库文件数太多,体积也比较大,使用

    git clone [email protected] 来下载的话,经常会出现

    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    远程挂起,提前结束,下载失败.
    

    问题是:

    clone文件可以断点续传么?

    如果可以,该怎么做?

    第 1 条附言  ·  2015-02-27 11:59:08 +08:00
    @yfdyh000 提到的,

    参考http://my.oschina.net/bygreencn/blog/347491的方法.
    5 条回复    2015-03-01 10:48:21 +08:00
    yfdyh000
        1
    yfdyh000  
       2015-02-27 11:24:39 +08:00
    http://m.oschina.net/blog/347491 的方法(我没试过),git init 一个空库然后 git fetch url
    infinet
        2
    infinet  
       2015-02-27 11:27:30 +08:00
    不能。记得曾经有个google summer of code项目打算增加这个功能,后来没下文。

    有个权益之计,可以先shallow clone
    git clone --depth=1 xxxx

    以后需要时再unshallow(新版git),不支持unshallow的老版git用
    git fetch --depth=2147483647 xxxx
    抓取所有历史。
    urmyfaith
        3
    urmyfaith  
    OP
       2015-02-27 11:57:43 +08:00
    @yfdyh000

    感觉这个方法可以,试试...

    谢谢.
    cnnblike
        4
    cnnblike  
       2015-02-27 12:47:56 +08:00 via Android
    先在vps上git clone然后压缩,接着用ftp下载下来吧
    ryd994
        5
    ryd994  
       2015-03-01 10:48:21 +08:00 via Android
    clone到一半中断,文件应该还在,正常接着pull应该就可以了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1461 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 23:55 · PVG 07:55 · LAX 16:55 · JFK 19:55
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.