幂等git重基失败并产生伪冲突?

幂等git重基失败并产生伪冲突?,git,git-rebase,Git,Git Rebase,我的git存储库有大约2000次提交。出于教育目的,我一直在玩git-rebase-I 当我键入git-rebase-I first-commit(其中first-commit是对repo的初始提交的标记)并且什么也不更改(即保持所有pick不变)时,git开始重放我的历史记录,但在几十次提交时失败。这是什么原因造成的?为什么它不简单地重播我的整个历史?我尝试用一个开源项目重新创建它,并得到了类似的结果,在使用rebase interactive的第一次提交上重定基址时报告了冲突 我第二次运行它

我的git存储库有大约2000次提交。出于教育目的,我一直在玩
git-rebase-I


当我键入
git-rebase-I first-commit
(其中
first-commit
是对repo的初始提交的标记)并且什么也不更改(即保持所有
pick
不变)时,git开始重放我的历史记录,但在几十次提交时失败。这是什么原因造成的?为什么它不简单地重播我的整个历史?

我尝试用一个开源项目重新创建它,并得到了类似的结果,在使用rebase interactive的第一次提交上重定基址时报告了冲突

我第二次运行它,发现它同时发生

git clone git://git.lttng.org/lttng-tools.git
git tag first-commit fac6795
git rebase -i first-commit

Could not apply e4baff1... listing and activation of loglevel by number
git rebase --abort
冲突似乎发生在合并点附近:

* 843f5df (HEAD, tag: new-tag) API change for lttng_destroy_session prototype
*   90192ee Merge branch 'master'
|\  
| * 4dbd54a update loglevel printout
| * e4baff1 listing and activation of loglevel by number
* | 76d45b4 Add support for UST enable all tracepoints
* | 6181537 Cleanup lttng enable event command
|/  
* 13dce3b loglevels: allow enable/disable
* 81afa34 Add loglevel to event list
* 57ab763 ABIs now support 256 char event names
使用选项-p再次运行重基已成功,但:

-p, --preserve-merges
           Instead of ignoring merges, try to recreate them.

           This uses the --interactive machinery internally, but combining it with the --interactive option explicitly is generally not a
           good idea unless you know what you are doing (see BUGS below).
git rebase将使历史变得更加线性。由于历史记录中存在合并,因此当合并点变平时,如果存在冲突,则必须解决这些合并