git: solving conflicts caused by rebase

北城余情 提交于 2020-01-17 05:25:05

问题


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


回答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.



来源:https://stackoverflow.com/questions/7194023/git-solving-conflicts-caused-by-rebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!