Skip to content

main: promote dev with a merge commit, not a squash - #1356

Merged
swapnilpaliwal-sd merged 1 commit into
devfrom
chore/main-merge-commits
Sep 26, 2026
Merged

swapnilpaliwal-sd merged 1 commit into
devfrom
chore/main-merge-commits

Conversation

@swapnilpaliwal-sd

Copy link
Copy Markdown
Contributor

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.md and the sync-dev comment in release.yml now 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 lacks non_fast_forward, which the script sets, so running the script adds that back.

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
swapnilpaliwal-sd merged commit 53b88f0 into dev Sep 26, 2026
12 checks passed
@swapnilpaliwal-sd
swapnilpaliwal-sd deleted the chore/main-merge-commits branch September 26, 2026 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant