Submit your PRs¶
Once you have a stack of branches, it's time to create Pull Requests on GitHub.
Submit the entire stack¶
stackit submit
This command:
- Pushes all branches to GitHub
- Creates PRs for each branch
- Sets the correct base branch for each PR (child branches point to their parent)
- Generates PR descriptions with stack context
Submit options¶
Submit from a specific branch¶
stackit submit --branch feature
This selects that branch and its ancestors. Add --stack to include its descendants.
Submit as draft PRs¶
stackit submit --draft
Submit the current stack¶
stackit submit --stack
Or use the shorthand alias:
stackit ss # Equivalent to: stackit submit --stack
Submission ordering¶
When submitting PRs, stackit optimizes for both speed and PR number ordering:
- All new PRs: When all branches in the submission need new PRs created, stackit submits them sequentially from bottom to top. This preserves PR number ordering so that PR #1 is the base of the stack.
- Updating existing PRs: When updating PRs that already exist, stackit submits in parallel for faster completion.
- Mixed submissions: If some PRs are new and some exist, the new ones are created sequentially while existing ones update in parallel.
The submit TUI shows progress for each branch as they're processed, indicating whether each PR is being created or updated.
PR descriptions¶
Stackit generates PR descriptions that include:
- Your commit message
- Position in the stack
- Links to parent and child PRs
- Visual representation of the stack structure
You can customize the footer behavior with:
stackit config set submit.footer true
Updating PRs¶
After making changes to your stack:
- Make your changes and commit:
stackit modify # Amend the current commit
modify automatically restacks descendants; follow any reported recovery
steps if it stops on a conflict.
- Update the PRs:
stackit submit
Stackit will update existing PRs instead of creating duplicates.
Regenerate titles and descriptions¶
After changing commit messages or regrouping branches, replace existing PR text with descriptions generated from the current commits:
stackit submit --regenerate
This overwrites titles and descriptions for the selected PRs even when their branches have no new commits to push. One commit supplies its subject and body; multiple commits use the oldest subject and a chronological list of subjects. An empty generated description clears the old editable text. A locked PR keeps its lock banner, and Stackit restores its generated stack sections afterwards.
Because it replaces text people may have written by hand, in a terminal
--regenerate shows the replacement text and asks before writing it. Scripts
and agents (--no-interactive, or no terminal attached) are not prompted.
Preview replacement text without saving it or updating PRs:
stackit submit --regenerate --dry-run
Add --json for structured previews, or use --regenerate --edit to edit the
regenerated text before submitting. Without --regenerate, existing text is
preserved. --always forces submission but does not regenerate text, and
--force controls Git push protection independently.
Merge your stack¶
Once your PRs are approved, merge the entire stack:
Interactive merge wizard¶
stackit merge
Launches an interactive wizard to guide you through merging options.
Merge bottom PR, then restack¶
stackit merge next
Merges the bottom-most unmerged PR using GitHub automerge, then restacks remaining branches.
Consolidate and merge¶
stackit merge ship
Consolidates all branches into a single PR for atomic merging.