Git: Why does rebase result in conflicts while merge does not?

前端 未结 2 692
感动是毒
感动是毒 2021-02-05 04:04

I\'m probably not getting something right, but could anyone explain to me why git rebase results in conflicts, while git merge (same branch) does not?

2条回答
  •  被撕碎了的回忆
    2021-02-05 04:35

    During a rebase, you apply all commits of some branch on top of another one. It is possible that one of those commits has a conflict that you solved in a subsequent commit. Hence, the merge operation has no conflict whereas the rebase lead to intermediate conflicts.

    See also git rerere which allows you to automatically solve conflicts that you already solved.

提交回复
热议问题