Git Flow
Git Flow Summary
Git Flow is a branching model and workflow that provides a structured approach to managing and organizing code changes in a Git repository. It was introduced by Vincent Driessen and has become a popular approach for collaboration in software development teams.
Branches:
master
branch: Represents the production-ready code and should always contain stable, deployable versions of the project.develop
branch: The main development branch where new features are integrated and tested before being merged into themaster
branch.
Feature Branches:
- Feature branches are created from the
develop
branch and used to develop new features or enhancements. - Each feature branch is dedicated to a specific feature and is named descriptively (e.g.,
feature/login-page
). - Once a feature is complete, the branch is merged back into the
develop
branch.
Release Branches:
- Release branches are created from the
develop
branch when preparing for a new production release. - These branches allow for final testing, bug fixing, and minor adjustments before merging into the
master
branch. - After the release branch is ready, it is merged into both
master
anddevelop
branches. - The merge into
master
also involves tagging the release with a version number.
Hotfix Branches:
- Hotfix branches are created from the
master
branch to quickly address critical production issues. - They allow for immediate fixes without interrupting the regular development process.
- Once the hotfix is complete, it is merged back into both
master
anddevelop
branches. - Similar to release branches, the merge into
master
includes tagging the fix with an updated version number.
Comments ()