rebase - automatically continue if rerere resolved all conflicts

前端 未结 2 848
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-03 23:26

Git rerere provides for reuse of previous conflict resolutions during rebase, and can even stage the resolved files by setting rerere.autoupdate = True (as detailed

2条回答
  •  梦毁少年i
    2021-02-03 23:51

    Rebase should use more the rerere-autoupdate from Git 2.14.x/2.15 onward (Q3 2017).

    See commit f826fb7, commit 8d8cb4b, commit 6f0e577, commit 9b6d7a6, commit 5fb415b, commit fd4a3f4 (02 Aug 2017) by Phillip Wood (phillipwood).
    (Merged by Junio C Hamano -- gitster -- in commit 1016495, 22 Aug 2017)

    That is because now:

    rebase: honor --rerere-autoupdate

    Rebase accepts '--rerere-autoupdate' as an option but only honors it if '-m' is also given.
    Fix it for a non-interactive rebase by passing on the option to 'git am' and 'git cherry-pick'.

    rebase -i: honor --rerere-autoupdate

    Interactive rebase was ignoring '--rerere-autoupdate'.
    Fix this by reading it appropriate file when restoring the sequencer state for an interactive rebase and passing '--rerere-autoupdate' to merge and cherry-pick when rebasing with '--preserve-merges'.

提交回复
热议问题