Skip to content

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:

  1. Pushes all branches to GitHub
  2. Creates PRs for each branch
  3. Sets the correct base branch for each PR (child branches point to their parent)
  4. 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:

  1. Make your changes and commit:

    stackit modify  # Amend the current commit
    

  2. Restack child branches:

    stackit restack
    

  3. 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.

Next steps