GIT Rebase Fatal on Multiple 0.5GB Binary Files

前端 未结 3 1645
刺人心
刺人心 2021-02-19 22:45

[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          


        
相关标签:
3条回答
  • 2021-02-19 23:02

    You won't know if your machine is big enough until failing on the 'git rebase' but by that point your directory is in a munged state. During the rebase another branch was checked out (main) so that the 'secc' changes could be applied to it. Recover, and proceed with:

    git checkout secc
    

    Having failed on the rebase, as you've noted you've got two options:

    1. If rebase is not required, go with 'git merge main'
    2. Get a bigger machine and retry 'git rebase main'

    You don't have a practical option to ignore the 0.5GB files, do the rebase, and then get those giga files back.

    0 讨论(0)
  • 2021-02-19 23:11

    Try putting these in .git/info/attributes:

    # whatever gets them...
    yourfile binary -delta merge=binary
    *.yourext binary -delta merge=binary
    

    that'll cause merge conflicts if those files change, and you'll have to figure out what to do with them. check the gitattributes and rebase doc for other merge strategies, I'm not even going to name the dangerous ones here.

    I'm not sure it's the actual merge trying to get the whole thing in core from running, but it seems worth a try.

    0 讨论(0)
  • 2021-02-19 23:13

    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.

    0 讨论(0)
提交回复
热议问题