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 only the current branch¶
stackit submit --branch
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 -
Restack child branches:
stackit restack -
Update the PRs:
stackit submit
Stackit will update existing PRs instead of creating duplicates.
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 squash
Consolidates all branches into a single PR for atomic merging.