Free — no signup required

GitFlow: The Classic, Structured Approach

2 min read

For Scheduled Releases

GitFlow is a strict branching model designed for projects with a scheduled release cycle — for example, "Version 2.0 ships on the first Tuesday of next month." It was introduced by Vincent Driessen in 2010 and became the dominant model for the following decade. It prioritizes stability and predictability over speed.

GitFlow defines five distinct branch types, each with a specific role:

  1. main (or master): The production branch. This branch contains only official, production-ready release history. You never commit directly here. Every commit on main represents a tagged release.
  2. develop: The integration branch for ongoing work. All completed features merge into develop. This is the branch your nightly build or staging environment tracks.
  3. Feature branches: Created from develop. A developer does their daily work here. Naming convention: feature/user-authentication. Once complete, it merges back into develop via a Pull Request.
  4. Release branches: When develop has accumulated enough features for a new version, you fork a release branch (e.g., release/2.0). Only bug fixes, documentation, and release preparation go here — no new features. Once ready, it merges into main (to ship it) and back into develop (so future versions inherit the fixes). The merge into main is tagged with the version number.
  5. Hotfix branches: The emergency lane. If production (main) has a critical bug, you branch directly off main (e.g., hotfix/payment-crash), fix it, and merge it immediately back into both main and develop.

Where GitFlow shines: Mobile apps (App Store releases), open-source libraries with versioned releases, enterprise software with formal QA cycles and compliance requirements.

Where GitFlow struggles: Teams deploying to production multiple times per day. The overhead of managing five branch types, coordinating release branches, and keeping develop and main in sync becomes a bureaucratic burden that slows everyone down. Vincent Driessen himself added a note to his original post in 2020 acknowledging that GitFlow is not appropriate for software that is continuously delivered.

Interview Tip

Interviewers often ask: "What's the difference between a release branch and a hotfix branch in GitFlow?" The key distinction is the source. A release branch forks from develop (planned work) and merges into both main and develop. A hotfix branch forks from main (emergency response to a production incident) and also merges into both main and develop. Both end up in both branches — but they start from different places for different reasons.

This is one of 18 chapters

Every chapter is free — Kubernetes, Terraform, SRE, distributed systems, and more — with fast daily review built in.

Sign up free