Knowledgebase

Git Branching Strategies Print

  • softwareengineering, software, troubleshooting, guide, howto, solution, zillionkinghost, hosting
  • 0

Organising parallel work.

WHAT A BRANCH IS FOR

Isolating work in progress from what is released.

WHAT SHORT-LIVED BRANCHES PROVIDE

Small changes, integrated frequently, with few conflicts.

WHY THAT MATTERS

Conflicts grow with divergence and with time.

WHAT TRUNK-BASED DEVELOPMENT IS

Everyone integrating to one main branch frequently, with incomplete work hidden behind flags.

WHAT IT REQUIRES

Strong automated testing The ability to hide incomplete features

WHAT IT PROVIDES

Minimal conflicts, and continuous integration in the real sense.

WHAT LONGER-LIVED BRANCH MODELS PROVIDE

Separation of development, release preparation and fixes.

WHAT THEY COST

Divergence, conflicts, and delayed integration.

WHAT SUITS MOST TEAMS

A protected main branch, with short-lived branches for each piece of work, merged within days.

WHAT TO PROTECT

The main branch, requiring review and passing checks.

WHAT TO AVOID

Branches living for weeks Branches nobody can merge Several long-lived branches diverging

WHAT TO DELETE

Branches once merged.


Was this answer helpful?
Back

Are you happy with your experience? Leave us a review on Trustpilot.


Trustpilot