Skip to content

Git Branching & Commit Standards

A clear Git workflow keeps collaboration predictable and avoids confusion. Branch names and commit messages must be consistent, descriptive, and easy to understand.

Branching rules

  • Branch names are lowercase only. No capital letters.
  • Allowed prefixes:
    • feature/... → new features
    • bugfix/... → non-critical fixes
    • hotfix/... → urgent production fixes
    • cr/... → code review iterations or cleanups
    • epic/... → large features spanning multiple tasks
  • Use hyphens - to separate words.
  • Branch names must be descriptive and scoped. Avoid generic or vague names.

Good examples

  • feature/auth-login-page
  • bugfix/menu-item-dialog-close
  • hotfix/payment-timeout
  • cr/refactor-header-component
  • epic/user-management-module

Bad examples

  • fix
  • testbranch
  • work
  • update123
  • temp

Branch lifecycle

  • Branches must be removed after merging and deploying into main to keep the repository clean.

Commit message rules

  • Commit messages must be descriptive and explain the change (not just "update" or "fix").
  • Use imperative mood: "add", "fix", "update" (not "added", "fixed", "updates").
  • Keep subject ≤72 characters. Use the body for extra context if needed.

Micro commits

  • Favor micro commits: small, focused commits that change only one thing.
  • Micro commits make code reviews faster, debugging easier, and history cleaner.
  • Avoid committing large unrelated changes in a single commit.