Re-use conflict resolution with Git

白昼怎懂夜的黑 提交于 2019-12-04 03:36:52

The simplest way to implement what you're asking for is probably to retroactively turn rerere on:

git config rerere.enabled true    # with rerere turned on,

git checkout $o^1             # rerun the original merge
git merge $o^2
git read-tree --reset -u $o:  # resolve conflicts exactly as before

git commit                    # throwaway commit to feed the results to rerere

and now that rerere has seen what you did with those conflicts,

git checkout -B old-master $o^1   # rewind `old-master` to before the merge
git merge master              # rerun it with current ancestry
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!