git - rsync git 大仓库

标签 git

我正在尝试将一个 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/

相关文章:

git - 将 socks 代理与 git 一起用于 http 传输

git 在多个分支之间暂存和提交

git - 如何浅克隆具有相对路径的本地 git 存储库?

没有经验的成员的 Git 工作流程

Android studio git 消息 : following untracked working tree files would be overwritten by merge, 但未显示哪些文件

node.js - Heroku 部署错误 : Cannot find module './errors/cast'

windows - 推送更改到 Git 不起作用

java - 无阻塞获取进程输出

c# - 如何使用 LibGit2Sharp 获取分支?

c# - 在 GitHub 页面中使用 ASP.NET