Why `git rebase -p` does not preserve conflict resolutions?

烂漫一生 提交于 2019-12-19 09:53:00

问题


Has the man page states about git rebase --preserve:

Merge conflict resolutions or manual amendments to merge commits are not preserved.

Is there any good reason for that?


回答1:


It would be the same reason for the existence of the command git rerere (Reuse recorded resolution of conflicted merges)
See "rerere your boat" and "Fix conflicts only once with git rerere".

Git does not record merge conflict resolution for any merge (including the one done again during a rebase -p)

Basically, a conflict merge resolution is a manual step (meaning a human decision has to be made), which git is not able to reproduce automatically (it is, or rather was, a "stupid" content tracker after all).
Git is only able to record said resolution (if one activates rerere first)



来源:https://stackoverflow.com/questions/35714919/why-git-rebase-p-does-not-preserve-conflict-resolutions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!