Tower Help & Support

Working with Base Branches

Base branches are the foundation of your Custom Git Workflow, serving as stable, long-lived branches that provide structure and consistency to your development process. Managing these branches effectively ensures that your team has reliable integration points and that changes flow smoothly through your development pipeline.

Base branches offer several key benefits that make them essential for organized development. They provide stable integration points where features can be combined and tested, establish clear hierarchies that define how changes should flow through your system, and create predictable environments for continuous integration and deployment processes.

For detailed information about configuring base branches and their relationships, see configuring your Custom Workflows branches.

Updating a Base Branch from Its Parent

One of the most important aspects of managing base branches is keeping them synchronized with their parent branches. When you have established parent-child relationships between base branches, maintaining this synchronization ensures that all branches benefit from the latest changes and that conflicts are resolved early in the development process.

Tower's Custom Git Workflows make this process straightforward by providing visual indicators when a base branch is behind its parent. You'll see yellow banners or notifications in the interface that alert you when updates are available, allowing you to take action before the branches diverge too far.

When to Update Base Branches

The timing of base branch updates is crucial for maintaining a smooth development workflow. You should consider updating base branches in several key scenarios.

Update your base branches immediately after important changes are merged into the parent branch, especially when those changes include security fixes, critical bug fixes, or foundational changes that affect other development work. You should also update base branches before starting new feature development to ensure that new work begins from the most current foundation.

Regular synchronization, such as daily or weekly updates depending on your team's development pace, helps prevent branches from diverging too far and reduces the complexity of eventual merges.

The Update Process

When Tower detects that a base branch is behind its parent, you can initiate the update process directly from the interface. Tower will analyze the changes and warn you if there are potential merge conflicts, allowing you to prepare for any necessary conflict resolution.

The update process typically involves merging the parent branch into the child base branch, preserving the commit history while bringing the branch up to date. Tower handles this process automatically, but you maintain control over when and how the updates occur.

Handling Conflicts During Updates

Sometimes updating a base branch from its parent will result in merge conflicts, particularly when both branches have received changes that affect the same files or code sections. Tower provides comprehensive conflict resolution tools that help you resolve these issues efficiently.

When conflicts occur during base branch updates, Tower presents a clear interface showing the conflicting changes from both branches. You can review each conflict, choose the appropriate resolution, and ensure that the merged result maintains the integrity of both the parent and child branch changes.

After resolving conflicts, Tower completes the update process and your base branch will be synchronized with its parent, ready to serve as a stable foundation for continued development work.

Impact on Child Branches

When you update a base branch, it's important to consider the impact on any child branches that depend on it. Child branches, including both other base branches and topic branches, may need to be updated to reflect the changes you've just integrated.

Tower's auto-update system can help manage this process by notifying you when child branches become outdated after you update their parent. This cascading update system ensures that changes flow efficiently through your entire branch hierarchy while giving you control over when each update occurs.