Git branching best practices
Source code goes through multiple stability phases during the development process:
- Active development
- Initial code integration
- Code integration for quality assurance (QA)
- Code integration for final user acceptance testing (UAT)
- Final code integration for production releases
Affected products and versions
- Adobe Commerce on cloud infrastructure
- Adobe Commerce on premises
Branch management
Each development phase should have a corresponding branch in Git to track code changes and facilitate the deployment process:
- Task branch—Where developers commit their individual code changes while implementing specific tasks, like features and bug fixes.
- Development branch—Where multiple developers merge changes from their individual task branches into a single development branch for automated integration testing. This branch is deployed to a development environment.
- QA branch—Where developers merge changes after development is complete and the code has passed all automated integration testing and code review. This branch is deployed to the QA environment for manual QA testing.
- Stable/UAT branch—Where code is merged after it passes manual QA testing. This branch is deployed to a UAT environment for user acceptance testing.
- Production/release branch—Where code is merged after it passes UAT. This branch is deployed to production for a release.
TIP
Adobe Commerce on cloud infrastructure projects contain specific branches that correspond to different environments. See the Pro project workflow and Starter project workflow in the Cloud Guide.
Branch strategies
There are several branching strategies that you can use. Choose a strategy that works best for your development team and the complexity of your project.
For more information, see the following external resources:
recommendation-more-help
754cbbf3-3a3c-4af3-b6ce-9d34390f3a60