πΏ 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