[This question is essentially reopening git crash during rebase which never had an answer]
I'm attempting to a rebase from my 'secc' branch as:
$ 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?
The failure is related to the fact that both branches and their common ancestor have three .dat files each of which is 0.5 GB.
How can I do a rebase in this situation?
Additional info:
Rebasing can be dangerous! Rewriting history of shared branches is prone to team work breakage. This can be mitigated by doing the rebase/squash on a copy of the feature branch, but rebase carries the implication that competence and carefulness must be employed.
Merging is a safe option that preserves the entire history of your repository, while rebasing creates a linear history by moving your feature branch onto the tip of main .
Yes, you can rebase more than once. After rebasing, you get a fresh set of commits. These commits are exactly like all other commits and hold no record of having been rebased. The main thing you need to be careful for is the possibility of rebase conflicts.
Rebasing is better to streamline a complex history, you are able to change the commit history by interactive rebase. You can remove undesired commits, squash two or more commits into one or edit the commit message. Rebase will present conflicts one commit at a time whereas merge will present them all at once.
In the comments you've said that doing the same with a computer that contains more, in this case 32GB, memory has resolved the issue. Based on that, I would conclude that you just had too little memory available to do this on the machine you first tried it with.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With