πͺ΅Git Conventions
This document outlines the standard conventions for Git commits and branch naming to maintain consistency and clarity across the project.
You can use the following tool to generate commits and branches:
Commits
We follow the Conventional Commits specification for commit messages. This provides a structured format that enables automated changelog generation and semantic versioning.
Commit Message Format
Types
feat: A new feature for the userfix: A bug fix for the userdocs: Documentation only changesstyle: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)refactor: A code change that neither fixes a bug nor adds a featureperf: A code change that improves performancetest: Adding missing tests or correcting existing testsbuild: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)ci: Changes to CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)chore: Other changes that don't modify src or test filesrevert: Reverts a previous commit
Examples
Simple feature:
Feature with scope:
Bug fix with body:
Breaking change:
Chore with scope:
Documentation:
Best Practices
Use the imperative mood in the description ("add" not "added" or "adds")
Don't capitalize the first letter of the description
No period (.) at the end of the description
Keep the description line under 72 characters
Use the body to explain what and why, not how
Reference issues and pull requests in the footer when applicable
Branches
Branch names should be descriptive and follow a consistent pattern that indicates the purpose and content of the branch.
Branch Naming Format
or with ticket reference:
Types
featureor feat: New feature developmentbugfixor fix: Bug fixeshotfix: Urgent fixes for productionrelease: Release preparationdocs: Documentation updatesrefactor: Code refactoringtest: Adding or updating testschore: Maintenance tasks
Examples
Feature branches:
Bug fix branches:
Hotfix branches:
Documentation branches:
Refactoring branches:
Release branches:
Best Practices
Use lowercase letters
Use hyphens (-) to separate words, not underscores or spaces
Keep branch names concise but descriptive
Include ticket/issue numbers when applicable
Delete branches after they are merged
Avoid using only ticket numbers without description
Protected Branches
The following branches typically have special protection rules:
mainormaster: Production-ready codedevelop: Integration branch for featuresrelease/*: Release candidate branches
These branches often require pull request reviews and passing CI checks before merging.
Last updated