Stacks
A stack is several branches in one worktree, each built on the one below. Each branch is a layer, and each layer becomes its own pull request.
main
└─ schema
└─ api
└─ uiBuild
mia new schema --stack # a branch on top of this one, checked out here
mia new api --stack--worktree gives the new layer its own worktree. --in <worktree> adds to
another worktree's stack.
Move
mia up # the layer above
mia down # the layer below
mia stack go api # a layer by nameThese refuse when tracked files have uncommitted changes.
Look
mia stack # the layers, landed or not, and which needs a restack
mia stack name payments # name it; then mia switch payments
mia stack diff # this layer against the one belowKeep it in shape
mia stack restack # rebase every layer onto the one below
mia stack merge ui onto api # fold layers into a lower onemia never merges into your base branch.
Land
mia stack prprints git push and gh pr create for each layer, bottom first, for you to
run.
Forget
mia stack rm # forget the stack; branches and worktrees stay
mia stack rm --worktrees --branches # remove those too--branches refuses a branch with work nowhere else; --force deletes it
anyway.