在我们的存储库中,我们有两个分支已经分歧了一段时间,我需要将它们合并在一起。显然会有很多冲突,希望很小......
(foo )$ git rebase master
First, rewinding head to replay your work on top of it...
Applying: some_commit1
Applying: some_commit2
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging some_file.xyz
CONFLICT (content): Merge conflict in some_file.xyz
Failed to merge in the changes.
Patch failed at 0002 some_commit2
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
我想以某种方式保存需要解决的冲突和我的解决方案,以便我可以与团队分享它们作为代码审查,以便我们可以确保在合并中一切都正确完成。有没有办法做到这一点?
答案 0 :(得分:3)
看看git rerere。您可能还希望看到SO问题Sharing rerere cache。
解决合并冲突后但在提交解决方案之前,git rerere diff
会显示将要记录的分辨率。已提交的解决方案存储在.git / rr-cache