๐ฟ 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