Branching Strategies
Main Branches
- master/main: The primary branch representing the most stable, production-ready code. Protect this branch to prevent accidental changes.
- develop: The primary development branch where feature branches merge. It should represent code that is ready for testing and integration.
Feature Branches
- Create a new branch for each feature.
- Use clear and descriptive branch names with a standard prefix (e.g.
feature/new-login-page
). Branch names are always written in lowercase and use a dash instead of a space.
- Keep feature branches focused on a single change for easier review and merging.
Hot fix Branches
- Create a new branch for each bug fix, or change.
- Use clear and descriptive branch names with a standard prefix (e.g.
hotfix/database-error
). Branch names are always written in lowercase and use a dash instead of a space.
- Keep hot fix branches focused on a single change for easier review and merging.
Commits
- Write Messages Containing Verbs: Clearly describe your changes, providing context for reviewers. Use the present tense ("Added feature X" instead of "Add feature X").
- Keep Commits Atomic: Each commit should represent a small, self-contained change. This improves maintainability and makes it easier to revert if needed.
Pull Requests