Git rebase with --onto
implements the idea:
cut and paste from start commit
B
to end commitE
and put it "onto" commitO
.
If you have a situation where somebody made a somebranch
PR against master
but it should have been against another branch, like this: