f’I have the following:
A---B---C-----D-- branch dev
\--C'-E-/ branch test
I did it bad: C and C’ are almost the same commits, it would make more sense if I could make branch test start on C, instead of B.
How could I do that?, I guess rebase, but I’m not sure how to use it, thx
edit: wasn’t clear
what I’d like:
A---B---C-----D-- branch dev
\-E-/ branch test
or
A–B–D–E–D if not possible
You could rebase it on top of a temporary branch (made from
C)See
git rebaseand Rebasing, plusgit branch.That should give you:
I have left C’ (here as C”) because C’ isn’t exactly the same than C.
But as ams comments, if you need C’ gone, you would
That would get you an interactive rebase, allowing for
C'to be removed completely, replaying onlyEon top ofC.