How to do a fast-forward merge on GitHub?

Looks like GitHub does not support this – and this is a TERRIBLE affair.
You basically CANNOT run an atomic, linear commit strategy (the best there is) using the GitHub UI.

Note that Bitbucket DOES support this, and has much more fine-grained options for setting up the PR landing/integration strategy. Namely the ‘Rebase, fast-forward’ option which does a --ff-only update of the target/mainline branch. It also has a ‘Rebase, merge’ option which lets you run a rebase on target (so that your commits are linear) but integrates using a merge commit (if you want to track that the commits are all part of one logical unit/PR).

Both of these options seem superior to GitHub’s limited options of either using non-linear merge commits (GitHub’s ‘Merge pull request’ option) or linear rebase (‘Rebase and merge’ option), which does achieve linearity but creates duplicate commits on the source branch, thus always requiring manual Hard Resets locally if you want to keep things clean and in sync.

So… time to switch your repo provider it seems!

Leave a Comment