8 Tips for Effective Branch Management
Branching is what makes version management so important to developers. It allows teams to work in parallel, to experiment, and to ensure the right features are released at the right time. Good branch management is key to effective development, whereas bad branching causes risk and rework.
Keep Things Simple
Keep your branching model simple, with branches lasting only as long as necessary.
Have Well-Defined Policies
Each branch should have a single policy for who can make changes, when CI builds happen, what tests to run, etc.
Give Codelines an Owner
Appoint a single owner for each codeline or branch to resolve any ambiguities in the policy.
Don’t Retain Development or Task Branches
Creating branches for a team, task, or feature can be helpful for teams, but keep these short-lived and remove them at the earliest opportunity. Having too many dormant branches adds complexity and increases the risk of using the wrong branch.
Use Branches for Releases or Milestones
With most projects, releases have to be made while development continues. Create branches to separate a release while final testing is running or if you have multiple releases in production.
Make Streams a Key Workflow
Helix Streams – which are often called "branches with brains" – implements a robust workflow to control the behavior of branches. Helix Streams manage development (which is usually unstable) and releases (which are stable, restricted changes). Streams are great for simplifying and visualizing the flow of changes from development to release. They also help to prevent merging errors, especially on larger projects.
Protect Your Mainline
A common pattern for Continuous Delivery is to have a single mainline. This ensures the mainline is always buildable and potentially releasable. That means all commits have to be high quality. Use code reviews and pre-commit CI build and test.
Merge Down; Copy Up
Streams automates “merge down” and “copy up” after testing and verification. Merging down is merging code from a solid release into a work in progress development stream. Copy up is taking a completed project from dev to release.
Learn Version Management Best Practices
Learn how to assess and deploy high-quality, productive, and robust software version management. Download our white paper, 'Best Practices for Version Management' for more information.
This blog was originally published Dec. 14, 2015. Formatting and minor copy changes were made on Nov. 27, 2018.