Skip to content

docs(pr-workflow): follow-up push to an auto-merged branch is silently lost - #136

Merged
CybotTM merged 2 commits into
mainfrom
docs/automerge-followup
Aug 4, 2026
Merged

docs(pr-workflow): follow-up push to an auto-merged branch is silently lost#136
CybotTM merged 2 commits into
mainfrom
docs/automerge-followup

Conversation

@CybotTM

@CybotTM CybotTM commented Aug 4, 2026

Copy link
Copy Markdown
Member

What

Promoted learning (/retro promote, batch 5): with auto-merge armed, a fast merge + head-branch auto-delete can land the PR before a follow-up commit is pushed — git push then silently re-creates the deleted branch off a stale base, commit dangling, no PR, no error. Adds the check (gh pr view --json state before follow-up pushes to an armed branch) and the recovery (fresh branch + cherry-pick) next to the Arming Gate section.

Came from /retro: yes

…y lost

A fast merge + branch auto-delete makes git push re-create the deleted
branch with the commit dangling and no PR attached — nothing errors.
Check the PR state before pushing follow-ups to an armed branch.

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
Copilot AI lite review requested due to automatic review settings August 4, 2026 16:58
@github-actions github-actions Bot added documentation Improvements or additions to documentation skill labels Aug 4, 2026
@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The added guidance should be aligned with existing doc conventions and made unambiguous (state extraction, non-OPEN handling, and consistent placeholders) to avoid misleading readers in the failure scenario described.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Pull request overview

Adds operational guidance to the GitHub PR workflow reference to prevent “lost” follow-up commits when auto-merge/merge-queue merges quickly and the head branch is auto-deleted before a developer pushes additional commits.

Changes:

  • Documented the failure mode where pushing to an auto-deleted PR branch silently re-creates the branch with no PR attached.
  • Added a recommended pre-push check (gh pr view ... state) and a recovery path (new branch + cherry-pick).
File summaries
File Description
skills/git-workflow/references/pull-request-workflow.md Adds a new subsection warning about follow-up pushes to armed PR branches and how to detect/recover from the silent branch re-creation case.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 1
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

Comment thread skills/git-workflow/references/pull-request-workflow.md Outdated
…on-OPEN state

Signed-off-by: Sebastian Mendel <info@sebastianmendel.de>
@sonarqubecloud

sonarqubecloud Bot commented Aug 4, 2026

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Not ready to approve

The new doc text uses Git-specific “dangling” terminology in a way that’s technically inaccurate and may confuse readers about what happens after the branch is re-created.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

This review doesn't count toward merge requirements. Sign up for the private preview to control whether Copilot approvals count.

Review details

Suppressed comments (2)

skills/git-workflow/references/pull-request-workflow.md:1266

  • Same terminology issue here: a “dangling re-created branch” isn’t dangling; it’s just a re-created branch that’s no longer associated with a PR. Rewording will make the recovery steps clearer.
fresh branch off updated main and open a new PR. If a dangling re-created
branch already exists, delete it and rescue the commit via cherry-pick.

skills/git-workflow/references/pull-request-workflow.md:1256

  • “Dangling” is misleading here: after a push, the follow-up commit is still reachable from the re-created remote branch; the real issue is that the branch has no PR attached and won’t be merged automatically. Consider rephrasing to avoid the Git-specific meaning of “dangling commit”.

This issue also appears on line 1265 of the same file.

then silently **re-creates it** — off a now-stale base, with your commit
dangling and no PR attached; nothing errors and nothing merges.
  • Files reviewed: 1/1 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

We're testing this review assessment. Please use 👍 or 👎 to tell us if it's correct.

@CybotTM
CybotTM merged commit c63341b into main Aug 4, 2026
22 checks passed
@CybotTM
CybotTM deleted the docs/automerge-followup branch August 4, 2026 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation skill

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants