cirrus-actions / rebase

GitHub Action to automatically rebase PRs
MIT License
686 stars 138 forks source link

Keeping merge commits #59

Open dashersw opened 4 years ago

dashersw commented 4 years ago

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.