Course contentsShow
← Computer Science
Lesson 2197 of 2,87249. Version Control with GitFree lesson

Gitflow Workflow

Explore a structured branching model with develop, release, and hotfix branches.

Gitflow Workflow

What you'll learn: You'll discover how Gitflow structures branches into dedicated roles—develop, release, and hotfix—to support simultaneous development, staged releases, and urgent production fixes.

The Core Idea

Gitflow Workflow is a formal branching strategy that adds structure beyond Feature Branch Workflow. Instead of just main and feature branches, Gitflow introduces permanent branches (main and develop) and supporting branches (feature, release, and hotfix). Think of it like a hospital's emergency system: normal development flows through scheduled channels (develop), planned releases go through staging (release branches), but critical bugs get express treatment (hotfix branches straight from main).

The Branch Structure

Permanent branches:

  • main — always production-ready; tagged with version numbers
  • develop — integration branch where features merge and testing happens

Supporting branches:

  • Feature branches — branch from develop, merge back to develop
  • Release branches — branch from develop when ready to ship; minor fixes go here, then merge to both main and develop
  • Hotfix branches — branch from main for urgent production bugs; merge back to both main and develop

Why This Structure?

Gitflow separates concerns: developers work freely on develop without destabilizing production. When a release is imminent, you create a release/v1.2 branch to finalize it—no new features sneak in. Meanwhile, if production breaks, a hotfix/critical-bug branch fixes main immediately without waiting for the next release cycle.

The workflow ensures main is always deployable while develop absorbs ongoing work.

Key Takeaway: Gitflow Workflow uses develop for daily integration, release branches for pre-launch stabilization, and hotfix branches for emergency production repairs—creating clear pathways for parallel development, staged releases, and rapid fixes.