Tower Help & Support

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.

Custom Git Workflows provide built-in stacked branch support for individual developers. This approach integrates directly with Tower's workflow system and works entirely within Tower's interface, making it ideal for teams who prefer Tower's native workflow management.

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

Stacked branches are available as part of all Custom Git Workflows in Tower, requiring at least one trunk branch to establish the foundation for your branch hierarchy. Tower provides visual tools to create, manage, and synchronize these branch dependencies effectively.

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

To begin using stacked branches, you'll need to set up a Custom Git Workflow in Tower. Once configured, you can create branch dependencies by setting parent-child relationships, allowing you to build logical sequences of changes that support your development process.