In a typical Git-based workflow, especially in production environments, several important branches are created and maintained to manage different stages of development and deployment. Here are the key branches commonly used in production environments:
- Purpose: Represents the stable and release-ready version of the code.
- Usage: This branch is used for production deployment. All changes should be thoroughly tested and reviewed before merging into this branch.
- Purpose: Serves as the integration branch for features and bug fixes.
- Usage: This branch is used for merging feature branches and is where integration testing occurs. It acts as a staging area for code that will eventually be merged into the main branch.
- Purpose: Used to develop new features.
- Usage: These branches are created from the develop branch and are merged back into develop after the feature is complete and tested.
- Naming Convention: Typically named feature/feature-name.
- Purpose: Used to prepare for a new production release.
- Usage: These branches are created from the develop branch. They allow for final testing, bug fixing, and minor tweaks before merging into the main branch. After the release, they are also merged back into develop.
- Naming Convention: Typically named release/x.y.z (where x.y.z is the release version).
- Purpose: Used to quickly address critical issues found in production.
- Usage: These branches are created from the main branch to fix urgent bugs. After the fix is implemented, they are merged back into both main and develop branches.
- Naming Convention: Typically named hotfix/issue-identifier.
- Starting New Feature Development:
- Merging Feature into Develop:
- Creating a Release Branch:
- Merging Release into Main and Develop:
- Creating a Hotfix Branch:
- Merging Hotfix into Main and Develop:
Associate | Senior Analyst | Freelancer - Social Media Content Designer | Digital Marketing & SEO Writing | AI Content Writer | Landing Web-Page (SVG) Design Specialist | Content Editing & Documentation Expert
6 个月Very informative