Git rebase has an option called --rebase-merges. This keeps any merge commits that are on the branch to be rebased. Imagine a scenario where a branch is a combination of several other branches, but the authors want to rebase it onto master. In the current situation all the merge commits are lost and a single, linear branch will be created. --rebase-merges allows to keep the original history of that branch, along with all the merge commits, and just rebases it onto the target branch.
Git rebase has an option called
--rebase-merges
. This keeps any merge commits that are on the branch to be rebased. Imagine a scenario where a branch is a combination of several other branches, but the authors want to rebase it onto master. In the current situation all the merge commits are lost and a single, linear branch will be created.--rebase-merges
allows to keep the original history of that branch, along with all the merge commits, and just rebases it onto the target branch.