This document outlines the Git flow process used in this project.
- main: The primary branch for production-ready code.
- sandbox: Used for sandbox deployment and testing.
- feature: Created from sandbox for new features and enhancements.
- refactor: Dedicated to improving code structure and readability.
- hotfix: Used for urgent post-release fixes to ensure application stability.
-
Creating a Feature Branch
- Start work on a new feature by creating a branch from sandbox.
- Naming convention:
feature/your-feature-name
(e.g.,feature/user-auth
).
git checkout sandbox git pull origin sandbox git checkout -b feature/your-feature-name
-
Developing a Feature
- Work on the feature in your feature branch.
- Commit changes regularly with clear and concise commit messages.
git add . git commit -m "Add feature description"
-
Merging a Feature to Sandbox
- Once the feature is complete and tested, merge it back into the
sandbox
branch. - Ensure your branch is up-to-date with the latest changes from
sandbox
.
git checkout sandbox git pull origin sandbox git checkout feature/your-feature-name git merge sandbox
- Once the feature is complete and tested, merge it back into the
-
Creating a Pull Request
- Push your feature branch to the remote repository.
git push origin feature/your-feature-name
- Create a Pull Request (PR) to merge the feature branch into the sandbox branch.
- The PR should be reviewed by team members.
-
QA Testing
- Upon merging into
sandbox
, it will be deployed for QA testing. - Address any issues found in the respective feature branch, then repeat the process.
- Upon merging into
-
Merging Sandbox to Main
-
After QA approval, merge
sandbox
intomain
. -
Ensure the sandbox branch is up-to-date with the latest changes before merging.
git checkout main git pull origin main git checkout sandbox git merge main git checkout main git merge sandbox
-
-
Deploying to Production
- After merging into the main branch, the changes can be deployed to the production environment.