Git rerere提供在 rebase 期间重用以前的冲突解决方案,甚至可以通过设置 rerere.autoupdate = True
暂存已解决的文件(详见 another question)。然而,即使所有冲突都已解决并且所有文件已暂存,我仍然必须运行 git rebase --continue
以继续 rebase 操作。
如果 rerere
已解决所有冲突并暂存所有更改,我如何自动继续?
最佳答案
从 Git 2.14.x/2.15 开始(2017 年第三季度),Rebase 应该更多地使用 rerere-autoupdate。
参见 commit f826fb7 , commit 8d8cb4b , commit 6f0e577 , commit 9b6d7a6 , commit 5fb415b , commit fd4a3f4 (2017 年 8 月 2 日)Phillip Wood (phillipwood
) .
(由 Junio C Hamano -- gitster
-- merge 于 commit 1016495 ,2017 年 8 月 22 日)
那是因为现在:
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
'.
关于git - rebase - 如果 rerere 解决了所有冲突,则自动继续,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30771707/