2012-07-14 108 views
9

我從中拉需要永遠,因爲服務器很少有空閒內存,它是交換了很多東西,如何在git服務器端禁用壓縮?

remote: Compressing objects: 24% 

正在發生的事情(即使我在服務器上本地克隆)回購。網絡沒有那麼嚴格,所以發送所有未壓縮的數據都可以。我怎樣才能做到這一點?

+0

您可以嘗試使用[git-config](http://man.he.net/man1/git-config)中的'pack。*'選項進行遊戲。 – 2012-07-14 11:38:20

回答

13

從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命令進行設置。它也適用於裸回購。

+3

我在服務器端有一個裸回購。我可以去那裏編輯配置嗎? – 2012-07-14 13:59:49

+4

我想是這樣,或者運行: 'git config --add core.bigFileThreshold 1' – 2012-07-15 01:23:41