All the related questions ask about moving commits from the main branch to another branch.
My problem is somehow opposite:
M(n)-M(n+1)-M(n+2)-M(n+3)
\
B(1)-B(2)-B(3)-B(4)-B(5)
Consider that M
stands for a commit on master and B
for a commit on a secondary branch.
The contents of the parantheses are indexes.
I want to merge the branches and move B(5)
on top of the main branch, so right after M(n+3)
, disregarding any change made from M(n)
to M(n+3)
.
I'm avoiding to use git rebase
, as the structure of my repo is the same as that of a shared repo, and I don't know what will happen if I would rewrite the history with git rebase
in this context.