Skip to content

FAQ

Rung is a CLI tool for managing stacked pull requests on GitHub. It tracks branch dependencies, automates rebasing, and manages PRs across your stack.

A rung is a crosspiece on a ladder. Like rungs help you climb, stacked PRs help you build features step by step.

Not yet, but it’s on the roadmap. Currently rung only works with github.com.

Not currently. Rung is GitHub-specific. Support for other platforms may be added in the future.

See the Installation guide for all methods:

  • Pre-built binaries
  • Homebrew
  • cargo install
  • From source
  • Git 2.x
  • GitHub CLI (gh) authenticated, or GITHUB_TOKEN environment variable

Only if building from source. Pre-built binaries and Homebrew don’t require Rust.

Terminal window
rung init # Initialize
rung create -m "feat: my feature" # Create first branch
# ... make changes ...
rung create -m "feat: next part" # Stack more branches
rung submit # Create PRs

See the Quick Start for a complete tutorial.

Currently, branches need to be created with rung create to be tracked in the stack. Existing branches aren’t automatically detected.

How many branches should I have in a stack?

Section titled “How many branches should I have in a stack?”

3-5 branches is ideal. Longer stacks:

  • Are harder to review
  • Have more potential for conflicts
  • Take longer to merge

Yes. Start each stack from main:

Terminal window
git checkout main
rung create -m "feat: auth" # Stack 1
git checkout main
rung create -m "feat: payments" # Stack 2
Terminal window
# Standard git rename
git branch -m old-name new-name
# Update the stack manually
# Edit .git/rung/stack.json

Not directly. The stack order is determined by parent relationships. You’d need to:

  1. Manually update .git/rung/stack.json
  2. Rebase branches to match the new order
  3. Update PR base branches

This is an advanced operation—usually it’s easier to create a new stack.

Sync whenever main (or your base branch) gets new commits:

Terminal window
git checkout main
git pull
rung sync

Daily syncing is a good habit.

For each branch in your stack (bottom-up):

  1. Rung checks if the parent has moved
  2. If yes, runs git rebase --onto <new-parent> <old-parent> <branch>
  3. If conflicts occur, pauses for you to resolve
Terminal window
rung sync --abort

This restores all branches to their pre-sync state.

Rung uses the GitHub API to:

  1. Create PRs with correct base branches
  2. Use commit messages as PR titles
  3. Add stack navigation comments

Not directly through rung. You can:

  1. Edit PR descriptions on GitHub after creation
  2. Use GitHub PR templates in your repository

rung merge:

  1. Merges the PR via GitHub API
  2. Rebases child branches onto the new base
  3. Updates child PR base branches
  4. Removes the branch from the stack
  5. Deletes local and remote branches

Usually because:

  • main got new commits
  • Someone else pushed to a shared branch
  • A manual rebase was done outside rung

Solution: rung sync

Yes:

Terminal window
rung undo

This restores branches to their pre-sync state using backups.

Not directly. The PR is merged on GitHub. You’d need to:

  1. Revert the merge commit on GitHub
  2. Manually restore your stack
  1. Resolve the conflicts in your editor
  2. Stage the resolved files: git add .
  3. Continue: rung sync --continue

See Conflict Resolution for details.

Branches must be created with rung create to be tracked. If you created a branch with git checkout -b, it won’t be in the stack.

See the Contributing Guide for details on how to get started.

Open an issue on GitHub.