Stack Workflows
Stacked PRs use branches prefixed with stack/ and are designed for incremental review.
Create a stack
Section titled “Create a stack”# On your base branchoch stack create auth-schema
# Add changes and commit# ...
# Create the next layeroch stack create auth-serviceoch stack create creates stack/<name> and keeps it tied to the current stack history.
Submit a stack
Section titled “Submit a stack”och stack submit- Pushes all
stack/*branches. - Creates or updates PRs through the OpenCodeHub API when available.
- Uses
mainas the default base branch.
Use --draft to create draft PRs, and --message to prefix PR titles.
View stack
Section titled “View stack”och stack viewOutputs a simple ASCII stack tree with the current branch highlighted.
Sync stack
Section titled “Sync stack”och stack syncSyncs stack branches with the remote. Use:
--pushto only push--pullto only pull (rebase)--forcefor force-with-lease pushes
Status
Section titled “Status”och stack statusShows ahead/behind and sync status for each stack/* branch.
Rebase stack
Section titled “Rebase stack”och stack rebase --base mainRebases the current stack on the chosen base branch.
- Keep each stack layer small and reviewable.
- Avoid mixing unrelated changes across layers.
- When a lower PR merges, rebase or sync the upper layers.