glossary

Git Flow

A branching model that defines a strict set of branch types (main, develop, feature, release, hotfix) and rules for how and when branches are created, merged, and deleted.

Git Flow, popularised by Vincent Driessen in 2010, is a prescriptive branching strategy. The model defines two long-lived branches — main (production-ready code) and develop (integration branch for features) — and three supporting branch types: feature branches (branched from develop, merged back to develop), release branches (branched from develop for release preparation, merged to both main and develop), and hotfix branches (branched from main for emergency fixes, merged to both main and develop). The model enforces strict rules about which branch merges where. Feature branches are never merged directly to main. Release branches are created when develop reaches a release-ready state, allowing last-minute bug fixes without blocking new feature development. Hotfix branches allow critical production fixes to bypass the release pipeline entirely. Git Flow was widely adopted in the 2010s and remains popular in projects with scheduled releases and formal release cycles. However, it has been criticised for its complexity compared to simpler models like trunk-based development, especially for teams practicing continuous delivery. The overhead of maintaining multiple long-lived branches and the discipline required for correct merges leads many modern teams to prefer simpler strategies.

git flow feature start user-profile # start a new feature branch
git flow feature finish user-profile # merge feature back to develop
git flow release start v1.2.0 # start a release branch
git flow hotfix start 1.2.1 # start a hotfix from main
git flow hotfix finish 1.2.1 # merge hotfix to main and develop

git-agent works with any branching model, including Git Flow. Its atomic commits and conventional messages ensure that regardless of the branch topology, each commit carries a clear intent. When release and hotfix merges happen, the commit history remains readable and useful for changelog generation.

brew install gitagenthq/brew/git-agent
Is Git Flow still recommended for modern projects?
It depends on the release model. For projects with scheduled releases and formal QA cycles, Git Flow's structure is beneficial. For continuous delivery teams deploying multiple times per day, trunk-based development or GitHub Flow is simpler and more efficient.
What is the difference between Git Flow and GitHub Flow?
GitHub Flow is simpler: it uses only a main branch and feature branches. Feature branches are merged to main via pull requests and deployed immediately. There is no develop or release branch. GitHub Flow is designed for continuous deployment.
Can git-agent automatically determine the correct branch type?
git-agent does not manage branches. It operates on whatever branch you are currently on. The commit message type (feat, fix, etc.) reflects the change content, not the branch name, though git-agent can optionally reference the branch name in the commit scope.