Tower Help & Support

Overview

Branch dependencies are a core feature of Tower's Custom Git Workflows, providing the foundation for organizing and managing your development process through structured branch relationships. This feature is available when you configure a Custom Git Workflow in Tower and enables powerful automation and synchronization capabilities.

For an overview of workflow types and when to use Custom Workflows, see choosing a workflow.

Custom Git Workflows in Tower provide a comprehensive system for organizing and managing your development process through structured branch relationships. At the heart of this system are branch dependencies, which establish clear parent-child relationships that define how changes flow through your project.

Foundation: Branch Dependencies

Branch dependencies form the cornerstone of Custom Git Workflows by establishing parent-child relationships between branches. These relationships allow you to track how changes should flow through your development process and ensure that important updates reach all the branches that need them.

With branch dependencies, you create relationships by setting a parent branch for each branch. This is typically the branch that your current branch was created from. For example, creating a feature branch "my-feature" from branch "main" will set "main" as the parent of "my-feature". In this parent-child relationship, the parent branch "main" serves as the base branch for "my-feature".

These dependencies help you maintain clear hierarchies that identify commit origins and prevent unwanted modifications. When you establish these relationships, Tower can automatically detect when child branches need updates from their parents and suggest the appropriate merges to keep everything synchronized.

Branch Types in Custom Workflows

Custom Git Workflows organize branches into two distinct categories, each serving specific roles in your development process.

Base Branches

Base branches serve as the foundational, long-lived branches in your workflow. These are the stable branches that form the backbone of your development process and typically include branches like main, develop, staging, or production.

Base branches provide several key benefits in your workflow organization. They receive priority treatment in Tower's sidebar and branch lists, making them easy to identify and access. Tower ensures these branches are permanently retained and never archived, maintaining their availability as stable reference points for your development work.

When you configure base branches in your workflow, Tower uses them as focal points for determining commit and branch ownership. This helps you understand which changes belong to which part of your development process and provides clearer insights into your project's structure.

Topic Branches

Topic branches are short-lived branches designed for specific features, bug fixes, or other focused development work. These branches typically follow naming conventions with prefixes like feature/, bugfix/, hotfix/, or release/ to clearly indicate their purpose.

Topic branches excel at organizing specific development tasks and integrating seamlessly with your base branches. Tower provides quick creation tools that automatically apply appropriate prefixes and select the correct parent branches based on your workflow configuration.

When you finish work on topic branches, Tower can apply predefined merge strategies to integrate changes efficiently. The system can automatically determine merge status based on parent or base branches and provide default deletion behavior when merging into base branches, helping keep your repository clean and organized.

Advanced Features Through Dependencies

Branch dependencies enable powerful workflow features throughout Tower:

  • When comparing a branch (via the Compare button in its history), Tower automatically selects its parent branch to immediately show which commits have been introduced on that particular branch.
  • When creating a Pull Request for a branch, Tower already knows its base branch and can propose it by default.
  • Tower detects when feature branches fall behind their base branches and offers to merge those changes, keeping branches up-to-date and reducing merge conflict complexity.
  • Tower can automatically determine whether a branch has been fully merged into its parent (when using regular merges).

Stacked Development
You can create multiple levels of dependencies to build stacked branches, where branches depend on other branches in sequential chains. This approach works exceptionally well for breaking large features into manageable pieces. Learn more in our stacked branches guide.

Managing Branch Relationships

When creating a new branch, Tower automatically sets the starting point as the parent branch if you're branching from another branch. You can modify these relationships at any time through the branch context menu in the sidebar.

By default, Tower offers base branches and direct ancestors as available parent options, but you can select any branch as a parent through the configuration dialog. This flexibility allows you to adapt your branch structure as your development needs evolve.