Overview
Stacked branches offer a powerful development approach where branches can depend on other branches in a sequential chain, rather than all branching directly from your main branch. This workflow excels when you're developing complex features that benefit from being broken into smaller, focused changes.
Understanding Stacked Branches
In traditional branching, every feature branch starts from the main branch. With stacked branches, you create a chain where each branch builds upon the previous one:
main
└── authentication-system
└── user-profiles
└── profile-settings
This approach transforms large, monolithic features into a series of logical, manageable changes. Each branch in the stack represents a complete, reviewable unit that contributes to the overall feature development.
Core Benefits
Smaller, focused changes make code reviews more effective and less overwhelming. Instead of reviewing a massive feature branch with hundreds of changes, reviewers can focus on specific, logical increments that are easier to understand and validate.
Parallel development becomes possible when you need to work on dependent features. You can continue building the next piece while the previous branch undergoes review, maintaining development momentum without waiting for approval cycles.
Cleaner project history emerges naturally as each branch represents a logical progression of related changes. This makes it easier to understand how complex features evolved and simplifies troubleshooting when issues arise.
Reduced merge conflicts occur because you're working with smaller changesets that integrate more frequently. When conflicts do arise, they're typically smaller and easier to resolve.
Stacked Branches in Tower
Tower supports stacked branches through two different approaches, each suited to different team needs and development styles.
Tower's built-in stacked branches work out of the box for individual developers. They integrate directly with Tower's branch dependencies and work entirely within Tower's interface, with no CLI tools or setup required.
External Workflows like Graphite offer advanced collaborative features for stacked development. These workflows provide comprehensive team-based stacked pull request capabilities but require additional CLI tools to be installed and configured.
To understand which approach fits your team's needs, see choosing a workflow.
Tower's Stacked Branch Support
Tower's built-in stacked branches are always available — there's no feature to enable and no configuration step before you can start stacking. The one exception is the workflow selected for your repository: stacked branches don't apply when the Graphite workflow or the classic git-flow CLI workflow is active, since each of those brings its own model for organizing branches. Tower provides visual tools to create, manage, and synchronize branch dependencies in all other cases.
Currently, stacked branches work locally for individual developers. This means you can build and manage your branch stacks within your local repository, taking advantage of the organizational and development benefits while working on your features.
Local Development Stacked branches in Tower currently support individual developer workflows and cannot be shared among team members. We plan to add collaborative stacked branch support in future releases.
While you can create pull requests from stacked branches, Tower doesn't currently provide built-in protection against merging them in the wrong order. You'll need to manage the merge sequence manually to maintain the intended branch dependencies.
Full Stacked PR Workflow For a complete stacked pull request workflow with advanced collaboration features, consider using Tower's Graphite integration, which provides comprehensive tools for team-based stacked development.
Getting Started
You can start stacking right away. Create a branch from another branch — or set a branch's parent from its context menu in the sidebar — and Tower tracks the dependency, letting you build logical sequences of changes that support your development process. See working with stacked branches for the details.