我有一个 repo,从中 pull 需要永远,因为服务器几乎没有空闲 RAM 并且它正在交换很多
remote: Compressing objects: 24%
正在发生(即使我在服务器本地克隆)。网络不受限制,因此发送所有未压缩的数据就可以了。我该怎么做?
最佳答案
来自 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 之类的东西就可以了。
通过注释扩展:您可以使用 git config --add core.bigFileThreshold 1
命令进行设置。它也适用于裸 repo 。
关于git - 如何在 git 服务器端禁用压缩?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11483288/