Version Control
Description:
This document outlines the version control practices used for the vogen.serialization
repository.
Version Control System:
The project utilizes Git as its version control system.
Branching Strategy:
The repository employs a “git flow” branching model. The main branches are:
- master: Contains the production-ready code.
- develop: Contains the latest stable development version.
- feature/feature-name: Branches created for new features, enhancements, or bug fixes.
- hotfix/issue-number: Branches created for urgent bug fixes to be deployed immediately.
Workflow:
- Create a new feature branch: For new features, create a branch from
develop
usinggit checkout -b feature/<em>feature-name</em> develop
. - Commit changes: Regularly commit changes to the feature branch with clear and concise commit messages.
- Push changes: Push the feature branch to the remote repository.
- Create a pull request: Submit a pull request to merge the feature branch into
develop
. - Review and merge: Review the code changes and merge the feature branch into
develop
once approved. - Deploy to production: Once the changes are ready for production, merge
develop
intomaster
and deploy.
Example:
- Create a new feature branch:
git checkout -b feature/add-new-serializer develop
- Commit changes:
git add .
git commit -m "Added a new serializer for JSON data."
- Push changes:
git push origin feature/add-new-serializer
- Create a pull request:
[Link to GitHub pull request page]
- Review and merge:
[Link to GitHub pull request page]
- Deploy to production:
git checkout master
git merge develop
git push origin master
Hotfixes:
- Create a hotfix branch: For urgent bug fixes, create a branch from
master
usinggit checkout -b hotfix/<em>issue-number</em> master
. - Commit changes: Regularly commit changes to the hotfix branch with clear and concise commit messages.
- Push changes: Push the hotfix branch to the remote repository.
- Create a pull request: Submit a pull request to merge the hotfix branch into
master
. - Review and merge: Review the code changes and merge the hotfix branch into
master
once approved. - Deploy to production: Deploy the changes immediately.
Example:
- Create a hotfix branch:
git checkout -b hotfix/123 master
- Commit changes:
git add .
git commit -m "Fixed a critical bug in the serializer."
- Push changes:
git push origin hotfix/123
- Create a pull request:
[Link to GitHub pull request page]
- Review and merge:
[Link to GitHub pull request page]
- Deploy to production:
git checkout master
git merge hotfix/123
git push origin master
Code Review:
All pull requests are subject to code review before merging. This ensures that the code adheres to coding standards, follows best practices, and integrates well with the existing codebase.
Collaboration:
Collaboration is encouraged throughout the development process. Developers are expected to communicate effectively, provide constructive feedback, and work together to ensure the quality and maintainability of the codebase.