Warn against pushing to auto-merged branches in CLAUDE.md

Commits pushed after a PR auto-merges are orphaned from main.
Always check PR state before pushing to an existing branch.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-03-23 00:14:57 +01:00
parent 52b2baaf58
commit 223f75b4c3
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9

View file

@ -127,6 +127,12 @@ main → feature-a → feature-b → feature-c
- When feature-a merges, rebase feature-b onto main
- This keeps you unblocked while PRs are in CI
### Important: Do not push to a branch after its PR auto-merges
With the `automerge` label, PRs squash-merge as soon as CI passes. If you
push additional commits to the branch after that, those commits are orphaned
— they won't be on main. Always check `gh pr view <number> --json state`
before pushing to an existing PR branch.
### After merging
- Update main: `git checkout main && git pull`
- Delete merged branches: `git branch -d <branch>`