Stacked PRs
What is a stack?
A stack is a chain of changes where each builds on the previous one. For example:
- Database migration
- API endpoint (depends on #1)
- Frontend component (depends on #2)
These must land in order. Each PR targets the branch below it, not main directly.
Creating stacked PRs
- Build your changes as a vertical chain in VisualJJ
- Create a PR for the bottom change first
- Create PRs for the changes above it
Landing a stack
Merge from bottom to top. After each merge, the next PR's target updates automatically.
When to use stacks
Stacks work well when:
- Changes genuinely depend on each other
- You want smaller, reviewable PRs for large features
- Reviewers can follow the logical progression
Don't use stacks for unrelated changes—create separate PRs instead.
Pro features
VisualJJ Pro adds automation for stacks:
- Stack position indicators
- Automatic update of PR target branch
- Links between PRs so reviewers see the full picture
See Licensing for details.