git clone 出現Cannot allocate memory

今天拉取分之的時候出現以上錯誤,按照以前往上搜索的修改註冊表無效.後來在國外一個網站上找到解決方案.
html

git config --add core.bigFileThreshold 4m

完美解決.git

一堆鳥文,誰有興趣能夠幫忙解釋一下什麼意思,鳥文以下.shell

The error itself originates in git's sha1 object handling code, but it is hard to say what's going on exactly without say knowing what's the errno returned by mmap.less

Could you run your command under strace and post here the lines around mmap failure?post

EDIT: Try git config --add core.bigFileThreshold 4m (or maybe even a lesser number).fetch

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.

https://www.kernel.org/pub/software/scm/git/docs/git-config.html網站

附上問題連接:http://stackoverflow.com/questions/20652850/git-fetch-cannot-allocate-memorythis

相關文章
相關標籤/搜索