PalmInfrastructure
Palm GitFlow
4min
The GitFlow process is a branching model that facilitates the management of software development projects. It defines a structured approach to branching, merging, and deploying code changes. The following document outlines the key aspects of the GitFlow process for Palm.
Palm GitFlow
Branches:
- Master Branch:
- The Master branch serves as the primary branch in the repository.
- It always contains the latest stable version of the code.
- Deployments to production are made exclusively from this branch.
- Feature Branches:
- Feature branches are created from the Master branch to develop new features or enhancements.
- Developers work on feature branches to isolate changes and collaborate on specific tasks.
- Upon completion, feature branches are merged into the Master branch via pull requests.
- Feature branches can be deployed to the development (Dev) and staging environments for testing.
- Hotfix Branches:
- Hotfix branches are derived from the Master branch to address critical issues or bugs in the production environment.
- They allow for immediate fixes without disrupting ongoing development activities.
- Once a hotfix is validated, it is merged back into both the Master branch and the relevant environment branches.
- Hotfix branches can also be deployed to the development (Dev) and staging environments for testing.
- Environment Branches:
- Environment branches represent different deployment environments such as Development (Dev), Staging, and Production.
- They hold the codebase specific to each environment.
Workflow:
- Creating Feature/Hotfix Branches:
- Feature and hotfix branches are created from the Master branch to address specific tasks or issues.
- Feature branches facilitate parallel development efforts, while hotfix branches enable rapid bug fixes.
- Development and Testing:
- Developers work on their respective feature or hotfix branches, implementing and testing changes locally.
- Once development is complete, changes are pushed to the remote repository and undergo automated testing.
- Merging into Master:
- Feature and hotfix branches are merged into the Master branch via pull requests after thorough testing and review.
- Pull requests ensure code quality and allow for collaboration among team members.
- Deployment:
- Feature and hotfix branches can be deployed to the development (Dev) and staging environments for testing.
- Deployments to production are only initiated manually from the Master branch.
Creating a Hotfix Branch:
- Identify the Issue:
- Recognize a critical issue or bug in the production environment that requires immediate attention.
- Create a Hotfix Branch:
- Start by checking out the Master branch:git checkout master
- Create a new branch specifically for the hotfix:git checkout -b hotfix/<issue-name>
- Implement the Hotfix:
- Focus solely on resolving the identified issue within the hotfix branch.
- Make necessary code changes and ensure they directly address the problem.
- Testing and Validation:
- Thoroughly test the hotfix locally to ensure it effectively resolves the issue without introducing regressions.
- Verify that the hotfix branch functions as intended and mitigates the problem it was created to address.
- Deploy to Development (Dev):
- Push the hotfix branch to the remote repository:git push origin hotfix/<issue-name>
- Trigger a manual deployment to the Dev environment directly from the hotfix branch.
- Deploy to Staging:
- Upon successful validation in the Dev environment, trigger a manual deployment to the Staging environment directly from the hotfix branch.
- Merge to Master:
- After ensuring the hotfix is effective and stable in both the Dev and Staging environments, create a pull request to merge the hotfix branch into the Master branch.
- Deploy to Production:
- Manually deploy the changes from the Master branch to the production environment, ensuring that the hotfix is successfully implemented and resolves the issue in the production environment.
Creating a Feature Branch:
- Identify the Feature:
- Determine a new feature or enhancement to be implemented within the application.
- Create a Feature Branch:
- Begin by checking out the Master branch:git checkout master
- Create a dedicated branch for the new feature:git checkout -b feature/<feature-name>
- Implement the Feature:
- Develop the new feature within the feature branch, adhering to project coding standards and guidelines.
- Commit changes regularly and push them to the remote repository:git push origin feature/<feature-name>
- Testing and Validation:
- Conduct thorough testing of the feature locally to ensure it functions as expected and aligns with project requirements.
- Verify that the feature branch delivers the intended functionality without introducing any unforeseen issues.
- Deploy to Development (Dev):
- Manually deploy the feature branch to the Dev environment, initiating the deployment directly from the feature branch.
- Deploy to Staging:
- Following successful testing and approval in the Dev environment, manually deploy the changes to the Staging environment to validate the feature's functionality and performance.
- Merge to Master:
- Once the feature is thoroughly tested and validated in both the Dev and Staging environments, create a pull request to merge the feature branch into the Master branch.
- Deploy to Production:
- Manually deploy the changes from the Master branch to the production environment, ensuring the feature is successfully implemented and available to end-users.
Key Considerations:
- Branches:
- Master Branch:
- Serves as the primary branch in the repository.
- Always contains the latest stable version of the code.
- Deployments to production are exclusively made from this branch.
- Feature Branches:
- Created from the Master branch to develop new features or enhancements.
- Developers work on feature branches to isolate changes and collaborate on specific tasks.
- Upon completion, feature branches are merged into the Master branch via pull requests.
- Feature branches can be deployed to the development (Dev) and staging environments for testing.
- Hotfix Branches:
- Derived from the Master branch to address critical issues or bugs in the production environment.
- Allow for immediate fixes without disrupting ongoing development activities.
- Once a hotfix is validated, it is merged back into both the Master branch and the relevant environment branches.
- Hotfix branches can also be deployed to the development (Dev) and staging environments for testing.
- Environment Branches:
- Represent different deployment environments such as Development (Dev), Staging, and Production.
- Hold the codebase specific to each environment.
- Workflow:
- Creating Feature and Hotfix Branches:
- Created from the Master branch to address specific tasks or issues.
- Development and Testing:
- Developers work on their respective feature or hotfix branches, implementing and testing changes locally.
- Merging into Master:
- Feature and hotfix branches are merged into the Master branch via pull requests after thorough testing and review.
- Deployment:
- Feature and hotfix branches can be deployed to the development (Dev) and staging environments for testing.
- Deployments to production are only initiated manually from the Master branch.
- Deployment Process:
- Manual deployments from the Master branch to the production environment ensure stability and code quality.
- Key Considerations:
- Branch Lifecycle:
- Regularly update feature and hotfix branches with changes from the Master branch to prevent merge conflicts and keep the branches up-to-date.
- Merge Requests:
- Require code reviews and approvals for all merge requests to maintain code quality and ensure that only verified changes are merged into the Master branch.
- Environment Isolation:
- Maintain isolation between development, staging, and production environments to prevent unintended impacts on production systems.
Updated 08 Mar 2024
Did this page help you?