git:解决由rebase引起的冲突 [英] git: solving conflicts caused by rebase

查看:156
本文介绍了git:解决由rebase引起的冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我过去做过非常糟糕的事情,所以我必须在开始时插入一个空的提交以进行变基。在执行解决方案的所述步骤时(在此处)由于许多合并冲突,我在 rebase 命令中苦苦挣扎。有些过于复杂,以至于我几乎无法解决它们。它们大多数具有以下结构:

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)..

在搜索时,我发现git提供了rerere工具,用于应用已解决的冲突。不幸的是,我之前不知道它,所以它没有打开。是否可以激活它并扫描历史记录以获取解决方案?还是有不同的方法来达到相同的结果?还是我只能通过手工解决所有问题?

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?

在此先感谢

TiBo

推荐答案

目前,您只能手工解决冲突。然而。如果您描述了您要解决的原始问题,则可能有一种方法可以解决那个而无需重新设置基准。

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.

这篇关于git:解决由rebase引起的冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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