为什么`git rebase -p`不能保留冲突解决方案? [英] Why `git rebase -p` does not preserve conflict resolutions?

查看:180
本文介绍了为什么`git rebase -p`不能保留冲突解决方案?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

手册页是否显示 git rebase - 保留


合并冲突解决方案或手动修改合并提交不会被保留。 $ b

有没有什么好的理由?

解决方案

这与命令 git rerere 存在的原因相同c $ c> Re 使用 re 有冲突的合并的 re 解决方案)

请参阅 a href =https://git-scm.com/blog/2010/03/08/rerere.html =nofollow>重新调整你的船和使用git rerere修复冲突一次



Git不记录任何合并的合并冲突解决方案(包括t他在一个 rebase -p >)基础上再次完成冲突合并的解决方案是一个手册步骤(意味着需要做出人为的决定),哪个git无法自动复制(毕竟它是或者完全是一个愚蠢的内容跟踪器)。

Git只能记录所述分辨率(如果激活 rerere 第一个)


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?

解决方案

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)

这篇关于为什么`git rebase -p`不能保留冲突解决方案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆