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

标签 git

我有一个 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/

相关文章:

Git:存储但不提取 LESS 文件

git - 捆绑和压缩 git repo 有什么区别?

git - 通过 git send-email 在同一主题下发送多个补丁

git - 如何为特定存储库配置 AWS CodeCommit 配置文件

node.js - git 添加 .添加node_modules时命令无响应

Git - 文件移动会被检测到吗?

python - 有没有办法让 git commit --verbose 在使用预提交 Hook 时显示更新的差异?

Git pull 总是调用 merge

git - 对已 git 添加然后 git 提交的文件进行更改似乎工作得很好

git - 获取在特定分支上*创建*的提交