Repository navigation
main: promote dev with a merge commit, not a squash - #1356
Merged
Merged
Conversation
A squash promotion lands on main as a new commit, so GitHub keeps listing dev's originals as ahead of main even once they are released. With merge commits main shares dev's history and the count is only unreleased work. protect-main.sh: protect-main allows only merge commits and no longer requires linear history; the repository allows merge commits, since that setting cannot differ per branch. Work into dev stays squash.
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 26, 2026 03:41
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promote dev to main with a merge commit instead of a squash.
A squash promotion lands on main as a new commit. GitHub then keeps listing dev's original commits as ahead of main, even after they are released: today it shows 15, while only one of them (#1351, CI only) is not on main. With merge commits, main shares dev's history, so "ahead of main" counts only unreleased work.
protect-main.sh: the protect-main ruleset allows only merge commits and no longer requires linear history. The repository allows merge commits, because that setting cannot differ per branch. Work into dev should still be squash-merged; nothing enforces that on dev, because a rule there would also block the direct pushes from sync-dev.RELEASING.mdand the sync-dev comment inrelease.ymlnow describe merge-commit promotion.The live settings still need an admin to apply them (
bash .github/scripts/protect-main.sh). The live protect-main ruleset has also drifted from this script: it lacksnon_fast_forward, which the script sets, so running the script adds that back.