A minimal CLI tool for managing stacked branches and syncing them to GitHub Pull Requests, inspired by tools like Charcoal and Graphite.
- 🪜 Stack Management: Create and manage chains of dependent branches
- 🔄 One-Command Sync: Rebase all branches, push changes, and update PR bases automatically
- 📊 Visual Status: See your stack structure at a glance
- 🎯 Minimal State: Uses git config to track parent relationships - no extra files or databases
- 🔧 Simple Integration: Works with standard git and GitHub CLI (
gh)
brew install javoire/tap/stackinatorSee Alternative Installation Methods for other options (Go install, binary download, build from source).
Start from your base branch (e.g., main):
# Create first branch in stack
stack new feature-1
# Make some changes and commit
git add .
git commit -m "Add feature 1"
# Create second branch stacked on feature-1
stack new feature-2
# Make more changes
git add .
git commit -m "Add feature 2"stack status
main
|
feature-1 [https://github.com/you/repo/pull/1 :open]
|
feature-2 [https://github.com/you/repo/pull/2 :open] *The * indicates your current branch.
After making changes or when the base branch is updated:
stack syncThis will:
- Fetch latest changes from origin
- Rebase each branch onto its parent (in order)
- Force (with lease) push all branches
- Update PR base branches to match the stack
- Handle merged parent PRs automatically
See Commands Reference for full documentation.
stack new <branch-name>- Create a new branch in the stackstack status- Display the current stack structurestack sync- Sync all branches and update PRsstack parent- Show the parent of the current branchstack prune- Clean up branches with merged PRsstack rename <new-name>- Rename branch preserving stack relationshipsstack reparent <new-parent>- Change the parent of the current branchstack worktree <branch-name>- Create a worktree for a branch
- How It Works - Stack tracking and sync algorithm
- Configuration - Customizing Stackinator
- Examples - Workflow examples and tips
- Troubleshooting - Common issues and solutions
MIT
Contributions welcome! See Contributing Guide for development setup and guidelines.
Inspired by: