1

Consider the following situation: We have the following branches:

  • A Which is our old baseline
  • B Which is our new baseline
  • C Which has new changes developed on top of A
  • D Which is developed merging B and C, and conflicts are resolved here

Now, we need to modify and rebase some commits on D. But, because rebase uses the commits per se (and not the end result of the resolve), it looks like we have to resolve the conflicts again.

Is there any way to (re)work on commits of D without need to solve the same conflicts?

Solarius
  • 13
  • 3

1 Answers1

1

I think you're looking for git rebase --preserve-merges. Without this option, it ignores the original merge commits and just commits the non-merge commits, leaving you to resolve some merge conflicts that were already done.

Reference: What exactly does git's "rebase --preserve-merges" do (and why?)

Community
  • 1
  • 1
jbu
  • 15,831
  • 29
  • 82
  • 105
  • You'll need to have enabled `rerere` *before* you even do the initial conflict resolution to make this simplest. – Mort Jan 23 '17 at 02:35
  • Thank you very much jbu, this was it! And will enable rerere in the future, thanks @Mort :) – Solarius Jan 28 '17 at 13:24