Git相关

作者: 瀚海来客 | 来源:发表于2019-10-18 11:17 被阅读0次

    为 git 添加配置项,通过下面的命令可以简单完成
    在这之前可以执行 git config -l 命令看看已有配置项有哪些
    git config --add core.compression -1
    这之后再尝试了一次 clone,works perfectly :)

    $ git clone https://github.com/boostorg/boost.git
    Cloning into 'boost'...
    remote: Counting objects: 183543, done.
    remote: Compressing objects: 100% (69361/69361), done.
    fatal: The remote end hung up unexpectedly
    fatal: early EOF
    fatal: index-pack failed
    

    core.compression
    An integer -1..9, indicating a default compression level. -1 is the zlib default. 0 means no compression, and 1..9 are various speed/size tradeoffs, 9 being slowest. If set, this provides a default to other compression variables, such as core.loosecompression and pack.compression. - From Git Manpage

    compression 是压缩的意思,从 clone 的终端输出就知道,服务器会压缩目标文件,然后传输到客户端,客户端再解压。取值为 [-1, 9],-1 以 zlib 为默认压缩库,0 表示不进行压缩,1..9 是压缩速度与最终获得文件大小的不同程度的权衡,数字越大,压缩越慢,当然得到的文件会越小。

    相关文章

      网友评论

          本文标题:Git相关

          本文链接:https://www.haomeiwen.com/subject/xslimctx.html