Skip to contentSkip to conversation

Out of memory error with git rebase

DISCUSSION Hannu Koivisto 3 participants 4 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

If 'git rebase origin/master' dies with an out of memory error (probably due to a few of large binary files in the repository, the largest being ~300MB and ~1GB in total in one directory), which settings should be tweaked and how to get rid of the problem? I tried...

[pack]
threads = 1
windowMemory = 64M
packSizeLimit = 512M

...based on some suggestions in the net but that was of no help.

I'm using git 1.7.5.1 in Cygwin and I also tried the latest master branch version (which behaved identically).

Signature · 1 line
Hannu
#1 lore raw

Am 26.10.2011 11:21, schrieb Hannu Koivisto:

Quoted 5 lines

If 'git rebase origin/master' dies with an out of memory error (probably due to a few of large binary files in the repository, the largest being ~300MB and ~1GB in total in one directory), which settings should be tweaked and how to get rid of the problem? I tried...

Try 'git rebase -m origin/master'. Without -m, rebase uses format-patch+am, i.e., assuming there are changes to the binary files that are to be rebased, a binary patch file would have to be generated and applied later. This is very likely where git bails out.

-- Hannes

#2 lore raw
Quoted 8 lines · Johannes Sixt

Am 26.10.2011 11:21, schrieb Hannu Koivisto:

Quoted 2 lines

If 'git rebase origin/master' dies with an out of memory error (probably due to a few of large binary files in the repository, the

Try 'git rebase -m origin/master'. Without -m, rebase uses format-patch+am, i.e., assuming there are changes to the binary files that are to be rebased, a binary patch file would have to be generated and applied later. This is very likely where git bails out.

Thanks, -m seems to help, even though the large binary files are not touched by the rebased commits (instead, they are touched by the commits on top of which I'm rebasing).

Quoted 1 line

From the documentation I can't figure out any reason why one

wouldn't always want to use -m. Why is it not the default? I think it's pretty much impossible for ordinary users to figure out that they need -m in a situation like this.

Signature · 1 line
Hannu
#3 lore raw
Quoted 4 lines · Hannu Koivisto

From the documentation I can't figure out any reason why one wouldn't always want to use -m. Why is it not the default? I think it's pretty much impossible for ordinary users to figure out that they need -m in a situation like this.

Because most people do not have too large binary blobs in the history, and at least when "rebase" was originally written, merge-based rebasing was way slower than patch-based one.