'Ignore' binary files in git rebase 'theirs'

前端 未结 2 1655
南笙
南笙 2021-01-20 16:30

I want to go from this

A - B - C - D - E - F - G 

where Branch1 is pointing at E and Branch2 is pointing at G

to this:



        
2条回答
  •  不要未来只要你来
    2021-01-20 17:10

    The following is a shot in the dark:

    From the git-rebase documentation:

       -m, --merge
           Use merging strategies to rebase. When the recursive (default)
           merge strategy is used, this allows rebase to be aware of renames
           on the upstream side.
    
           Note that a rebase merge works by replaying each commit from the
           working branch on top of the  branch. Because of this,
           when a merge conflict happens, the side reported as ours is the
           so-far rebased series, starting with , and theirs is the
           working branch. In other words, the sides are swapped.
    
       -X , --strategy-option=
           Pass the  through to the merge strategy. This
           implies --merge and, if no strategy has been specified, -s
           recursive. Note the reversal of ours and theirs as noted in above
           for the -m option.
    

    If -X implies --merge, and --merge swaps theirs and ours, maybe that's the problem. What happens if you switch theirs for ours?

提交回复
热议问题