我正在尝试将一个 git 存储库克隆到我的本地计算机上,但它显示“malloc failed
”,因为存储库太大。
有人知道我可以用来复制目录的确切 rsync 命令吗?或者我还能做些什么来克隆一个大存储库?
我试过 rsyncing 但它给了我以下错误:
Invalid command: 'rsync --server --sender -v . username/dir.git'
You appear to be using ssh to clone a git:// URL.
Make sure your core.gitProxy config option and the
GIT_PROXY_COMMAND environment variable are NOT set.
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [receiver=2.6.8]
尝试使用 git clone 时出现以下错误:
remote: Counting objects: 52708, done.
remote: Compressing objects: 100% (52188/52188), done.
fatal: Out of memory, malloc failed (tried to allocate 1471836719 bytes)
fatal: index-pack failed
最佳答案
只需使用较新版本的 git
。较新的版本可以处理这个问题。
或者,如果您已经在使用新版本,请将 git config core.bigFileThreshold
设置为较小的大小。
关于git - rsync git 大仓库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7167442/