Skip to main content

๐ŸŒฟ Branch Naming Guide

Use consistent, semantic branch names so your repo stays clean and scalable.


๐Ÿ”– Main Branchesโ€‹

  • main โ†’ Production (stable releases only)
  • develop โ†’ Ongoing development (optional, if using Git Flow)

๐Ÿ› ๏ธ Patch / Hotfix Branches (v1.6.0)โ€‹

Used for fixing bugs after a stable release.

From main:โ€‹

  • hotfix/v1.6.0-fix-cart-errors
  • hotfix/v1.6.0-auth-session-fix
  • hotfix/v1.6.0-critical-bugs

Grouped fixes:โ€‹

hotfix/v1.6.0-patch

๐Ÿ‘‰ Use hotfix/ when fixing production issues after release


โœจ Feature / Enhancementโ€‹

  • feature/v1.6.0-improve-cart-ui
  • feature/add-error-handling

๐Ÿ› Bug Fix Branch (non-critical)โ€‹

  • fix/cart-quantity-bug
  • fix/login-redirect-issue

๐Ÿงพ Commit Message Guide (Conventional Commits)

๐Ÿ”‘ Formatโ€‹

<type>(scope): short description


๐Ÿ“Œ Common Typesโ€‹

  • fix โ†’ Bug fixes (most important for patch releases)
  • feat โ†’ New features
  • refactor โ†’ Code improvements (no behavior change)
  • chore โ†’ Configs, build, cleanup
  • docs โ†’ Documentation
  • perf โ†’ Performance improvements

โœ… Example Commit Messages (v1.6.0 Patch)

๐Ÿ› Bug Fixesโ€‹

  • fix(cart): resolve quantity update 400 error
  • fix(cart): prevent 500 error when removing items
  • fix(cart): fix cart clearing causing server error
  • fix(auth): resolve session expiration edge case
  • fix(api): correct inconsistent product response schema

๐Ÿ” Auth / Security Fixesโ€‹

  • fix(auth): handle refresh token validation properly
  • fix(auth): prevent unauthorized access on expired session

๐Ÿ”„ Refactorsโ€‹

  • refactor(cart): simplify cart handler logic
  • refactor(api): standardize response format across endpoints

โš™๏ธ Deployment / Config Fixesโ€‹

  • chore(deploy): update render service configuration
  • chore(env): fix production environment variables

๐Ÿงช Small Improvements (Optional)โ€‹

perf(products): optimize product query performance


๐Ÿท๏ธ Release Commitโ€‹

When releasing:

chore(release): v1.6.0 patch release


๐Ÿ” Suggested Workflow

1. Create Branchโ€‹

  • git checkout main
  • git pull
  • git checkout -b hotfix/v1.6.0-patch

2. Developmentโ€‹

  • Make fixes
  • Follow commit conventions

3. Push & Mergeโ€‹

git push origin hotfix/v1.6.0-patch

  • Create Pull Request
  • Merge into main

4. Tag Releaseโ€‹

  • git tag v1.6.0
  • git push origin v1.6.0

๐Ÿ’ก Pro Tips

  • Keep commits small and focused
  • Use scopes (cart, auth, api, etc.)
  • Avoid mixing features in a patch release
  • If fixes grow large โ†’ consider a minor release instead of patch