git:解决rebase引起的冲突
因为我过去做了一些非常糟糕的事情,所以我必须在开始时插入一个空提交以进行变基。执行解决方案的描述步骤时(在此处找到 在 Git 中的根提交之前插入一个提交?)由于许多合并冲突,我在使用 rebase 命令时遇到了困难。有些问题太复杂了,我几乎不可能解决。它们大多数具有以下结构:
--A---B---C-- B changes file 'foo.txt'
\ / D and E change file 'file.txt'
D---E git rebase tries to apply B on D (due to time stamp)..
在搜索时,我发现 git 提供了 rerere 一个用于应用已经解决的冲突的工具。不幸的是我之前不知道所以它没有打开。是否可以激活它并扫描解决方案的历史记录?或者有不同的方法可以达到相同的结果吗?或者我除了手工解决所有问题之外没有其他可能性吗?
提前致谢,
蒂博
because I did something really bad in the past, I have to insert an empty commit at beginning for a rebase. When doing the described steps of the solution (found here Insert a commit before the root commit in Git?) I struggle at the rebase command because of many merge-conflicts. Some are so complicated that it is almost impossible for me to solve them. Most of them have following structure:
--A---B---C-- B changes file 'foo.txt'
\ / D and E change file 'file.txt'
D---E git rebase tries to apply B on D (due to time stamp)..
When searching around, I found that git provides with rerere a tool for applying already solved conflicts. Unfortunately I did not know it before so it was not turned on. Is it possible to activate it and scan the history for resolutions? Or is there a different way to achieve the same result? Or do I have no other possibility than solving everything by hand?
Thanks in advance,
TiBo
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,此时您只能手动解决冲突。然而。如果您描述了您试图解决的原始问题,则可能有一种方法可以在不进行变基的情况下修复该问题。
At this point, you're stuck with resolving conflicts by hand, unfortunately. However. if you describe the original problem you're trying to solve, there may be a way to fix that without a rebase.