How to Manage Git branches effectively?
Islam Tosson
Technical Lead | Backend Engineer | Kubernetes | Docker | Linux | .NET Core
Main Branches:
master (or main): The production-ready branch. This branch should always reflect the most stable version of the project. It should contain only tested and approved code.
develop: The integration branch where the latest completed features are merged. This branch is a step away from production and should be stable but may not be fully tested like master
Supporting Branches:
Feature (feature/): Used for developing new features or functionalities. Each feature should have its own branch, named descriptively, e.g., feature/user-auth.
Release (release/): Created from develop when the project is ready for a new release. This branch is used to prepare for the release, including final bug fixes, documentation, and other last-minute tasks.
Hotfix (hotfix/): Created from master to address critical issues found in the production environment. These changes are then merged back into both master and develop to ensure consistency.
Workflow:
Feature Development:
Releases:
Hotfixes: