This document provides a concise overview of the Git Flow branching model, designed for teams requiring structured release management and clear separation of development stages.
main: Represents the official release history. All commits here are production-ready and tagged with version numbers.develop: The integration branch for all new features. It contains the complete history of the project, including features under development for the next release.
feature/<feature-name>: For developing new features. Created fromdevelopand merged back intodevelopupon completion.release/<version-number>: For preparing new production releases. Created fromdevelop, merged intomain(and tagged), and also back intodevelop.hotfix/<bug-description>: For quickly patching critical bugs in production. Created frommain, merged intomain(and tagged), and also back intodevelop.
Follow a consistent format: <type>: <short commit title> (e.g., feat: add user authentication). Common types include feat, fix, docs, refactor, perf, test, build, ci, chore, revert.
PRs facilitate code review and integration. Best practices include opening early and frequent PRs, keeping them small and focused, ensuring automated checks pass, and requiring minimum approvals before merging.
Refer to the diagram below for a visual representation of the Git Flow branching model:
For a more in-depth explanation, refer to the Detailed Git Flow Documentation.
