且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在git服务器端禁用压缩?

更新时间:2023-11-27 21:52:10

来自git文档:

 core.bigFileThreshold  

    Files larger than this size are stored deflated, without
    attempting delta compression.  Storing large files without
    delta compression avoids excessive memory usage, at the
    slight expense of increased disk usage.

Default is 512 MiB on all platforms.
This should be reasonable for most projects as source code and other 
text files can still be delta compressed, 
but larger binary media files won't be.

Common unit suffixes of 'k', 'm', or 'g' are supported.

所以我想通过将此值设置为1可以解决问题.

So I guess by setting this value to something like 1 would do the trick.

由注释扩展:您可以使用git config --add core.bigFileThreshold 1命令进行设置.它也适用于裸仓库.

Extended by comments: you can set this with a git config --add core.bigFileThreshold 1 command. It works for bare repos as well.