Want a linear git history? Github has a button for you: "Rebase and Merge". You can even disable all the other merge buttons and force its use!
Problem is, Github is not particularly smart about how it does this.
In particular, if you have signed commits and your branch is showing up proud and verified,
your main
will still have unverified commits. Github really means rebase, in that case,
even when git merge --ff-only
would do the job.
With this tool you have a "merge button" which you can run to merge a PR from the command line, preserving both linear history and your signed commits.
This tool will fail unless both git
and gh
are installed, available on the PATH, and configured appropriately.
Your trunk branch is called main
.
cargo install --git https://github.com/wireapp/merge-pr
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/wireapp/merge-pr/releases/latest/download/merge-pr-installer.sh | sh