【问题标题】:How to retrieve git clone "repo.git" 's downloaded data?如何检索 git clone "repo.git" 的下载数据?
【发布时间】:2016-03-13 15:53:28
【问题描述】:

正在通过不稳定的网络连接克隆一个大的 git repo (~1.2 GB),虽然 repo 下载完成我看不到任何加载的文件,有没有办法检索下载的文件堆栈。

Git Clone 的输出:

remote: Total 1648547 (delta 0), reused 0 (delta 0), pack-reused 1648545
Receiving objects: 100% (1648547/1648547), 1.21 GiB | 62.00 KiB/s, done.
Resolving deltas: 100% (1324539/1324539), done.
error: unable to write sha1 filename /home/amitesh/code_progs/python_progs/odoo/odoo/.git/objects/pack
pack-29584ab98800ae5d2d0a256f998e131416e350ec.pack: No such file or directory
fatal: cannot store pack file
fatal: index-pack failed

【问题讨论】:

    标签: git github clone


    【解决方案1】:
    error: unable to write sha1 filename  /home/amitesh/code_progs/python_progs/odoo/odoo/.git/objects/pack
    pack-29584ab98800ae5d2d0a256f998e131416e350ec.pack: No such file or directory
    fatal: cannot store pack file
    fatal: index-pack failed
    

    根据上面的消息,很明显, git clone 失败了。看来您没有从远程下载数据。请再次尝试 git clone。

    【讨论】:

      【解决方案2】:

      试试git fetch,git应该会下载需要的文件。

      【讨论】:

        【解决方案3】:

        如果你不关心历史提交而只关心文件,你可以考虑使用@987654321@参数,例如

        git clone --depth 1 git@github.com:username/repo.git
        

        ,减少关于历史的网络传输。

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2014-11-19
          • 2021-01-18
          • 1970-01-01
          • 2012-08-04
          • 1970-01-01
          • 1970-01-01
          • 2016-09-03
          相关资源
          最近更新 更多