I have a repo with a master branch of 4 commits:
1-2-3-4 (HEAD → master)
Then I created a new branch (b2) and made the fifth commit, I merged b2 to master.
$ git merge b2 and I got this log :
1-2-3-4-5(HEAD → master, b2)
Now I wanna change the order of commit 2 so I made
$ git rebase -i HEAD~5, and I got this log :
1-3-4-2-5 (HEAD → master)
Two diverge branches.
And the result I want is :
1-3-4-2-5 (HEAD → master, b2)