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