Git Flow
This document outlines the Git branching strategy for Coldtivate.
Main Branches
The following branches are permanent and protected:
main
: Contains production-ready code. Only merges fromdevelopment
are allowed.development
: Integration branch for ongoing development. All feature and fix branches are merged here.
Supporting Branches
Branch Type | Prefix | Base Branch | Merge Target | Naming Convention |
---|---|---|---|---|
Feature | feat/ |
development |
development |
feat/ABC-123-feature-name |
Bug Fix | fix/ |
development |
development |
fix/ABC-123-bug-description |
Workflow
Creating a New Feature or Bug Fix Branch
- Ensure your local
development
branch is up to date: - Create a new branch: or for bug fixes:
- Implement changes and commit them with meaningful messages.
- Push your branch:
Merging Changes
- Once development on a branch is complete, create a pull request (PR) to merge into
development
. - After review and approval, the branch can be merged.
- Delete the branch after merging to keep the repository clean.
Releasing to Production
- Ensure
development
is stable and up to date: - Switch to
main
and ensure it's up to date: - Merge
development
and push to remote: - Tag the release:
Best Practices
- Keep branch names descriptive and concise.
- Write meaningful commit messages.
- Regularly update your branch with
development
to avoid merge conflicts. - Always create a PR for merging into
development
.
By following this strategy, we maintain a clean, organized, and efficient Git workflow.