首页 > 解决方案 > 为什么在交互式 rebase 删除简单提交期间会出现合并冲突?

问题描述

我有一个 git repo,我想从中删除一个提交,所以我git rebase -i 710b5ec51ff经常这样做。提交包含 1 个名为“ intro.cpp ”的文件。变基开始并最终失败:

error: could not apply 5a91d7f2f9b... Remove string
Resolve all conflicts manually, mark them as resolved with
"git add/rm <conflicted_files>", then run "git rebase --continue".
You can instead skip this commit: run "git rebase --skip".
To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 5a91d7f2f9b... Update language
Auto-merging locales/language.c
CONFLICT (content): Merge conflict in locales/language.c

为什么我会遇到这种冲突?我记得前段时间我需要解决这个冲突。为什么我需要再次这样做,尽管两个提交(我要删除的提交和停止的提交)完全不相关并且不共享文件?

标签: git

解决方案


推荐阅读