sm untrack
Remove a branch from the stack graph. Does not delete the branch itself.
Synopsis
sm untrack [branch] [--reparent]If no branch is given, untracks the current branch.
Flags
| Flag | Description |
|---|---|
--reparent | If the branch has tracked children, move them onto its parent. |
Examples
Drop tracking for the current branch:
bash
sm untrackUntrack a branch but keep its children in the stack:
bash
sm untrack feat/scratch --reparentWithout --reparent, untracking a branch that has tracked children is refused — the children would be orphaned.
What it does
- Removes
branch.<n>.stac-man-parent,-parent-sha, and-prfrom.git/config. - With
--reparent: re-points each tracked child's parent to the untracked branch's parent and restacks them. - Leaves the branch itself untouched in git.
When to use it
- You created a branch you don't actually want to ship as a PR.
- A branch was tracked by mistake.
- You're cleaning up after experimenting with a stack shape that didn't pan out.
