12

我有一个 repo 需要永远拉取,因为服务器的可用 RAM 很少,而且它交换了很多时间

remote: Compressing objects: 24%

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

4

1 回答 1

18

从 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命令进行设置。它也适用于裸回购。

于 2012-07-14T13:46:30.113 回答