简体   繁体   中英

How to record git merge conflicts and their resolutions but without automatically resolving conflicts?

I know that there is a feature that git has called rerere which stands for "reuse recorded resolution". This feature (if enabled) records the conflicts and their resolutions. That's great. But this feature also automatically resolves conflicts. That is a huge problem for us since we don't want automatic conflict resolution. Is there a way to use rerere to record the conflicts and their resolutions but NOT perform automatic resolutions? If not, is there a different way this could be done? Perhaps there is a GitHub plugin for this? (we use GitHub and I couldn't find such a plugin). Thanks.

We resolved this by simply defining a process that upon every merge from branch A to branch B with conflicts, the merge shall be done from B to A first while pushing the conflicts as-is (yes, in that commit the code will not compile). Then make another commit on branch A after resolving the conflicts. Then merge that into branch b with a pull request. This way, when a code review is done on the pull request, the reviewer can see the conflicts and how they were resolved before approving the merge.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM