A merge commit is a commit with at least two parents. These parents are in specific order.
If I\'m currently on the branch master, and I merge in the br
Inspired by this answer, I came up with this:
git replace -g HEAD HEAD^2 HEAD^1 &&
git commit --amend &&
git replace -d HEAD@{1}
The first commands switches the two parents in something called a replacement ref, but only stores it locally, and people have called it a hack.
The second command creates a new commit.
The third command deletes the older replacement ref, so it doesn't mess up the other commits depending on that commit.