We have a leading branch into which we have combined about 10 function branches one at a time.
So, a recent story looks like this:
merged feat/10 (HEAD of master) merged feat/9 merged feat/8 merged feat/7 merged feat/6 merged feat/5 ...
Now we found out that feat/7 was bad and we want to get it out of the wizard. The return of this merger is not enough, because we do not want this violation to be recorded in our history in general. We cannot use interactive rebase because it will smooth out the story so that it looks like everything was done in one branch, and we want to keep everything thatโs a good merge story.
Is there a way to block a specific merge commit from branch history?
I note that the real story is much more complicated than what you see in the above example, so manually repeat all the merges, since feat / 7 would not be a good option.
Edit
To clarify to those who vote to close this as duplicate: this is not a FAQ on how to infer a commit with rebase, which of course has been answered many times. The question here is to take out the fix without smoothing the merger history.
source share