πŸͺ΅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 Commitsarrow-up-right 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 user

  • fix: A bug fix for the user

  • docs: Documentation only changes

  • style: 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 feature

  • perf: A code change that improves performance

  • test: Adding missing tests or correcting existing tests

  • build: 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 files

  • revert: 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

  • feature or feat: New feature development

  • bugfix or fix: Bug fixes

  • hotfix: Urgent fixes for production

  • release: Release preparation

  • docs: Documentation updates

  • refactor: Code refactoring

  • test: Adding or updating tests

  • chore: 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:

  • main or master: Production-ready code

  • develop: Integration branch for features

  • release/*: Release candidate branches

These branches often require pull request reviews and passing CI checks before merging.

Last updated