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

Tam*_*lei 10 git

我有一个永久拉动的回购,因为服务器有很少的可用内存,并且它正在交换很多时间

remote: Compressing objects: 24%
Run Code Online (Sandbox Code Playgroud)

正在发生(即使我在服务器上本地克隆).网络没有那么受限制,所以发送所有未压缩的数据都没关系.我怎样才能做到这一点?

Pet*_*oes 15

从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.
Run Code Online (Sandbox Code Playgroud)

所以我想通过将这个值设置为1就可以了.

通过注释扩展:您可以使用git config --add core.bigFileThreshold 1命令进行设置.它也适用于裸露的回购.

  • 我想是的,或者运行:`git config --add core.bigFileThreshold 1` (5认同)
  • 我在服务器端有一个简单的回购.我可以去那里编辑配置吗? (3认同)