What problem does it solve?
When working with Graphite (gt) stacked branches, gt absorb's blame-based algorithm often fails to assign changes to the right commit—new code has no prior line to blame onto, and hunks can land in semantically wrong commits. This Skill manually splits working-tree changes across the correct branches in the stack so each commit stays coherent and reviewable.
Core Features & Use Cases
- Change-to-branch mapping: Uses
git log -S, git branch --contains, and gt log long to identify which branch in the stack owns each concern in the diff.
- Bottom-up application: Checks out each target branch in order, applies only that branch's slice of the change, verifies with build/typecheck, and commits via
gt modify with automatic restacking.
- Restack conflict resolution: Guides manual resolution of conflicts during restacking, including locating conflict markers, merging both sides, and continuing with
gt continue.
- Use Case: You made a bugfix and a new feature on the top branch of a five-branch Graphite stack, but the bugfix really belongs three branches down. This Skill splits the changes, places each hunk on its owning branch, and restacks cleanly.
Quick Start
Ask the assistant to split the current uncommitted changes into the correct branches of the Graphite stack using the stack-absorb workflow.