如何在git服务器端禁用压缩? [英] How to disable compression in git server side?

查看:232
本文介绍了如何在git服务器端禁用压缩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个回购协议,因为服务器的可用RAM很少,并且在交换时经常交换

I have a repo from which pull takes forever because the server has little free RAM and it is swapping a lot while

remote: Compressing objects: 24%

正在发生(即使我在服务器上本地克隆).网络不受限制,因此可以发送所有未压缩的数据.我该怎么办?

is happening (even if I clone locally on the server). The network is not that constrained, so it would be fine to send all data uncompressed. How can I do that?

推荐答案

来自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.

这篇关于如何在git服务器端禁用压缩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆