多个 0.5GB 二进制文件的 GIT Rebase Fatal

标签 git git-rebase

【这道题本质上是重开git crash during rebase从来没有答案]

我正在尝试从我的“secc”分支进行 rebase :

$ git rebase main
First, rewinding head to replay your work on top of it...
fatal: Out of memory, malloc failed (tried to allocate 553656577 bytes)         # about 0.5 GB
$ git rebase --abort
No rebase in progress?

失败与两个分支及其共同祖先有三个 .dat 文件有关,每个文件为 0.5 GB。

在这种情况下我该如何做 rebase ?

附加信息:

  • “git merge main”工作得很好。
  • 使用“*.dat merge=keepTheirs”增强 .gitattributes 并没有阻止致命的发生。
  • *.dat 文件确实不同。
  • 我愿意删除 *.dat 文件以 rebase 其他文件,然后再添加回 *.dat。但是如何呢?
  • 我正在使用 git 1.7.9.4

最佳答案

在评论中,您曾说过,对包含更多内存(在本例中为 32GB)内存的计算机执行相同操作可以解决问题。基于此,我会得出结论,您在第一次尝试使用的机器上可用内存太少无法执行此操作。

关于多个 0.5GB 二进制文件的 GIT Rebase Fatal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10167119/

相关文章:

macos - 如何忽略图标?在 git 中

git - 如何在 IntelliJ IDEA 中存储 SSH 主机 key

git - interdiff 做 diff 做不到的是什么?

git - 更改根提交父项以指向另一个提交(连接两个独立的 git 存储库)

windows - 无法创建 '/git/index.lock' : File exists - but it doesn't

git - 比较 git branch 和 rebased branch

git - 解决我们删除的 git rebase

excel - 从 Excel VBA 执行 Git Bash

git - 是否有一种久经考验的方法来创建一个包含所有已知推荐忽略的 .gitignore ?

git rebase --interactive (reword) 给我留下了两棵具有相同提交信息的树