Skip to main content
RunBook Academy

Git, CI/CD & GitOpsXXIX · Branching StrategiesStrategies

GitFlow contextually — what it is, when it fits, and why it does not fit modern CI

Advanced⏱ ~22 mingit

What you'll learn

  • Articulate the five branch types of GitFlow and the role of each
  • Identify the historical context in which GitFlow was the right strategy
  • Recognise the modern CI assumptions GitFlow violates
  • Apply the GitOps-specific reasoning for why GitFlow does not fit

Prerequisites

Verified against Git 2.55.x teaching target; 2.40+ minimum · GitHub Actions continuous service; Aug 2026 documentation baseline · Argo CD v3.5.x teaching target; v3.0+ minimum · Flux v2.9.x · Sigstore Cosign v3.1.x · SLSA v1.2 · OCI Distribution Specification v1.1 · Git LFS v3.7.1 · Kubernetes (cross-course target) 1.36.x

Not yet marked complete on this device.

GitFlow is the branching model published by Vincent Driessen in 2010. It defines five branch types: master, develop, feature/*, release/*, hotfix/*. Each has a defined role, lifetime, and merge points. The model was designed for the era of scheduled releases, manual QA cycles, and no continuous integration. It is internally consistent; it solves the problems of that era; it does not solve the problems of modern CI.

For an infrastructure team running GitOps, GitFlow adds complexity without adding safety. The develop branch is not a deployable source; the controller reads main. The hotfix branch bypasses the controller because it merges into master and develop simultaneously, producing a sync the controller did not orchestrate.

The five branch types

  • master — Production releases. Every commit is a tagged release.
  • develop — The next release’s accumulated work.
  • feature/* — Cut from develop, merged back when complete.
  • release/* — Cut from develop when feature-complete; merges into both master and develop.
  • hotfix/* — Cut from master for emergencies; merges into both.
flowchart LR
    D["develop"]
    F["feature/*"]
    R["release/*"]
    H["hotfix/*"]
    M["master"]
    D -->|"cut"| F
    F -->|"merge"| D
    D -->|"cut"| R
    R -->|"merge"| M
    R -->|"merge"| D
    M -->|"cut"| H
    H -->|"merge"| M
    H -->|"merge"| D

The diagram shows the GitFlow topology: every branch type has a defined source and destination. The audit trail is complete in principle. The cost is the operational complexity of five branch types and the dual-merge discipline.

Why GitFlow made sense in 2010

In 2010, releases were scheduled — quarterly, monthly. QA was manual. CI was rare. GitFlow solved the integration problem (scheduled integration on develop), the hotfix problem (parallel branch from master), and the audit problem (named releases as the audit trail).

Why GitFlow does not fit modern CI

Modern CI makes three assumptions that GitFlow violates:

  1. The trunk is always deployable. GitFlow’s develop is not always deployable — it accumulates work between releases.
  2. Integration is continuous, not scheduled. Every commit to the trunk triggers CI. GitFlow’s scheduled integration is the opposite.
  3. Hotfixes are normal, not exceptional. In modern CI, a “hotfix” is a feature branch with high priority and a flag. No special branch type is needed.

Why GitFlow does not fit GitOps specifically

  • develop is not a deployable source. The controller reads the trunk. In GitFlow, the trunk is master, but develop is where integration happens. The controller is reading the wrong branch.
  • Hotfixes bypass the controller. A hotfix merges directly into master (and develop). The merge is a local git operation; the controller is not involved.
  • The graph is unnecessarily complex. Five branch types means five merge paths to audit.

When GitFlow still fits

Two situations still call for GitFlow: versioned software with long support windows (a team shipping a library with semver stability), and scheduled-release teams with manual QA. For most modern infrastructure teams, neither applies. The team deploys continuously, the controller is the deployment surface. GitFlow adds ceremony without adding value.

Production discipline

  1. Default to trunk-based. The default for modern infrastructure teams is trunk-based.
  2. If GitFlow is adopted, document the controller branch. The choice must be explicit.
  3. Hotfix branches bypass the controller by design. In GitOps, that violates the principle.
  4. Audit the graph quarterly. A team that adopted GitFlow two years ago may have drifted.
  5. Migrate to trunk-based when release cadence changes. Forward-going.

Cross-course references

  • GitOps with Argo CD - Part II (RepoLayout) covers the GitOps repo layout for trunk-based: one branch, one controller.
  • CI/CD Pipeline Patterns - Part II (PipelineShapes) covers pipeline shapes for trunk-based.
  • Terraform for Production Sysadmins - Part XI (PRWorkflows) covers the Terraform analogue.

Quiz

Knowledge check · 4 questions

  1. Q1. A team adopting GitOps with GitFlow needs the controller to align with the Git history. Which branch should the controller read?

  2. Q2. GitFlow is a coherent model that solved real problems in its era; the question is whether those problems are still the team's problems.

  3. Q3. Name the three modern CI assumptions that GitFlow violates.

  4. Q4. Diagnose a team running GitFlow alongside GitOps and recommend a migration plan.

    A team adopted GitOps six months ago but kept GitFlow. The controller reads `master`; the team works on `develop`. Release branches cut from develop merge into both `master` and `develop`. Three recent hotfixes bypassed the controller because the merges were local without CI.

Passing score: 75%. Answers are checked in this browser.