squash-absorbslisted
Install: claude install-skill MrBinnacle/skills
# A Squash Merge Absorbs Commits From an Unpushed Base
## Problem
You cut a feature branch, open a PR, squash-merge it. The default branch afterwards is
missing commits that had nothing to do with your feature — their content is there, but
their messages, SHAs and authorship are gone, folded into your feature's commit.
Nothing failed. No warning appeared. Both behaviours that produced it are correct.
## Context / Trigger Conditions
The composition needs three things, and each is individually unremarkable:
1. **A commit lands on the default branch locally and is not pushed.** Any workflow that
commits without pushing does this: a session-close ritual, a `version` bump before a
release, a script that commits generated artifacts, or simply forgetting.
2. **A feature branch is cut from that local default branch.** The normal move.
3. **The PR is squash-merged.** The default on many repositories, and often enforced.
Symptoms, in the order you are likely to meet them:
- The PR's **Commits** tab lists commits you did not write on this branch.
- After the merge, `git log --oneline main` no longer shows a commit you remember landing.
- `git rev-list --left-right --count origin/main...main` reports both sides non-zero, and
a `git merge --ff-only` refuses with "Diverging branches can't be fast-forwarded".
- A file, ticket, tag or handoff cites a SHA that `git branch --contains <sha>` says is on
no branch.
## Mechanism
GitHub computes a PR's commit list as the commits