I have the following git history (from oldest A to newest D commits):
mybranch:
commit A
commit B
...
merge main into mybranch
commit C
commit D
...
I'd like to modify it to:
mybranch:
merge main into mybranch
commit A
commit B
...
commit C
commit D
...
How can I do this? I thought to use git rebase -i but that does not seem to allow reordering commits while preserving the merge commit.