Support Rebase+Merge (No FF) Pattern #173151
Replies: 4 comments
-
|
Love this pattern. You can get ~90% of “rebase-before-merge-commit” on GitHub today with a few settings and a light workflow, even if there isn’t a first-class strategy yet. Settings (repo → Settings):
Workflow:
Enforcement gaps today:
Feature request:
|
Beta Was this translation helpful? Give feedback.
-
|
Rebase + Merge (no fast-forward) isn’t directly supported by all platforms. Most UIs only offer Merge commit, Squash merge, or Rebase and merge. To enforce a “Rebase + no-FF” flow, you’d typically need to handle it locally with Git and push the branch. |
Beta Was this translation helpful? Give feedback.
-
|
This is a great feature request — thanks for documenting it so clearly. Current State on GitHub
None of these fully replicate the rebase-before-merge-commit (aka semi-linear merge) workflow. Workarounds Today
Why First-Class Support Would Help
Related Implementations
Suggested Next StepThe best way to move this forward is to open an issue in the official GitHub Feedback repo here: If you share this request there, GitHub product managers can triage it and consider it for future roadmap updates. |
Beta Was this translation helpful? Give feedback.
-
|
yes, yes, yes! it would already be a great improvement if we can just disable "Update with merge commit" from the github web ui when Keeping your pull request in sync with the base branch. for now we have to work around after the fact, by blocking merge to main if it contains merges itself... that gives not only a poor user experience. it also leads to doubling validation. because after the final rebase, you have to revalidate, after all... |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature Request: Support for "Rebase-before-merge-commit" Pattern
... also known in ADO and GitLab as "Semi-Linear Merge", which is a cool name, but less clear regarding the underlying structure proposed.
Motivation
The rebase-before-merge-commit pattern yields a clean, linear history in
mainwhile preserving clear PR boundaries:main.git log --first-parentshows a readable high-level history, and you can still drill down into a PR’s commits when needed.Examples:
Problem
GitHub currently offers three merge strategies: Merge commit, Squash merge, and Rebase and merge.
The first two are already well understood for the problems they create presenting history in an intelligible way, but the one that most often gets considered as a "linear history" option is Rebase and merge. However, it drops merge commits entirely — losing the “one commit per PR” structure.
Diagram Comparison
Existing: Rebase and merge
main.Desired: Rebase-before-merge-commit
M*is a merge commit whose first parent is the previous merge onmain.mainis a perfectly flat, linear chain of merge commits (git log --first-parent).Mcleanly encapsulates one PR, while still pointing to the detailed commits on its side branch.Enforcement Needs
To make this viable on GitHub:
Require PRs to be up to date with the base before merging.
(Use “Require branches to be up to date before merging.”)
Enforce merge commits (no fast-forward) and preserve PR boundaries.
Support in other Products
This feature, also known as Semi-Linear Merge is supported in ADO and GitLabs:
Request
Add first-class support for the rebase-before-merge-commit workflow, either as:
Outcome:
mainhas a readable, linear history of PR merges.Beta Was this translation helpful? Give feedback.
All reactions