← ClaudeAtlas

git-branch-soft-reset-and-recommitlisted

Use when a commit history needs rebuilding rather than the code it contains — `wip` commits to squash, one commit doing five unrelated things, or a history no reviewer can follow. Collapses everything with a soft reset and rebuilds it as atomic commits in the project's own message format, preserving authorship, proving the resulting tree is byte-identical to what it replaced, and gating each commit through the project's checks. Ships an editor-free interactive rebase toolkit for reordering, squashing, and verifying from an agent shell with no TTY.
tony/ai-workflow-plugins · ★ 2 · Code & Development · score 69
Install: claude install-skill tony/ai-workflow-plugins
# Soft reset and recommit Rebuild a branch's history so the commits explain the change, without changing a byte of the result. Argument: $ARGUMENTS — a PR number, a base ref, a hint about how to split, or nothing. Four references carry the parts that must not drift: - `references/branch-safety.md` — the gates, the backup, recovery, and the push. - `references/split-mechanics.md` — base resolution, the collapse, staging, splitting, verification. - `references/commit-messages.md` — style discovery, intent recovery, and the privacy gate. - `references/rebase-toolkit.md` — interactive rebase with no editor, plus `references/rebase-todo.sh`. ## Core principle The tree is the invariant. The history is the deliverable. A recommit that changes what the branch produces is a bug, no matter how good the commits look. Every decision below is subordinate to proving the final tree is identical to the one it replaced. ## Phase 1 — Gather intent, before anything destructive The collapse destroys the original commit boundaries. Everything worth knowing has to be read first. Read every original message whole, the trailers, the pull request body and its review threads, the linked tickets, and — when the repository does not explain itself — the session that wrote the code. Follow `commit-messages.md` Part 2, including its privacy gate: extract claims and re-state them, never copy a span out of a transcript. Record what each original commit was *for*. That mapping is the raw ma