"GitFlow" and "GitHub Flow". Although their names are similar, their contents are completely different. This article organizes the differences between the two and how to choose between them.
To begin with, the three terms are confusing
The first thing that is easy to stumble over is the three terms that have similar names.
Git: Software
The tool itself that performs version controlGitHub: Web service
A platform for publishing and sharing remote repositoriesGitHub Flow: Operational rules
A philosophy regarding how to use branches
GitHub Flow: Operational rules that prioritize simplicity
The philosophy of GitHub Flow is simple.
"Keep the main branch in a deployable state at all times."
This is the highest priority rule.
There are basically only two types of branches: main and feature
Work on a feature branch, review it via a Pull Request, and then merge it into main
Merged code is often reflected directly in the production environment
The structure is simple, easy to remember, and suitable for speedy development.
Suitable environmentsProducts that are updated frequently, such as web services and apps
Environments where CI/CD (automated testing and automated deployment) mechanisms are in place
Small teams that want to prioritize speed
GitFlow: Operational rules for strict release management
On the other hand, GitFlow is an operational rule set intended for more complex release management. It is characterized by separating branches by role.
5 types of branchesmain: Contains only released code
develop: The main line for ongoing development
feature: A working branch for adding features (branches from develop and merges back into develop upon completion)
release: For final adjustments just before a release (branches from develop and merges into both main and develop upon completion)
hotfix: For emergency bug fixes in production (branches from main and merges into both main and develop upon completion)
The key point is that release and hotfix branches are always merged into both main and develop. This ensures that main and develop do not drift apart even when emergency fixes or minor adjustments are made.
Because the roles of the branches are clear, it becomes easier to bundle multiple features for the next release or to set aside a preparation period before a release.
Suitable environmentsProducts where version number management (e.g., v1.0) is important, such as apps or games
Cases where multiple versions need to be maintained simultaneously
Large teams that want to clearly separate the development phase from the release preparation phase
Which one should you choose?
Here are two criteria for making your decision.
If your workflow involves deploying to production immediately after merging → GitHub Flow is suitable
If you have a fixed release date and need a preparation period → GitFlow is suitable
It is recommended to start with the simple GitHub Flow and consider introducing GitFlow only when you feel that release coordination has become difficult during operation. This approach allows for a smooth transition without unnecessary strain.
Summary
Git, GitHub, and GitHub Flow are different things. GitFlow and GitHub Flow are both 'rules for branch management'
GitHub Flow is simple and suitable for speed-oriented development in Web and SaaS environments.
GitFlow uses role-based branches and is suitable for planned release management.
If you are unsure, start with GitHub Flow. Consider GitFlow if the need arises.