git pull --rebase removes unpushed merge commits. Is there a way to make it preserve them?
git pull --rebase
Say my history looks like—
A | \\ B H | |
Simply:
git pull --rebase=preserve
From the docs:
When set to preserve, rebase with the --preserve-merges option passed to git rebase so that locally created merge commits will not be flattened.
--preserve-merges
git rebase