# Hướng Dẫn Đóng Góp ## Quy Trình Git & Branching ### Nhánh Chính | Nhánh | Mục đích | Protected | |-------|---------|-----------| | `main` / `master` | Production branch — stable releases | ✅ Yes | | `develop` | Development branch — integration point | ✅ Yes | | `feature/*` | Feature branches — phát triển tính năng mới | ❌ No | | `fix/*` | Bug fix branches | ❌ No | | `docs/*` | Documentation updates | ❌ No | | `refactor/*` | Code refactoring, cleanup | ❌ No | ### Quy Trình Tạo Feature Branch ```bash # 1. Cập nhật branch chính git checkout develop git pull origin develop # 2. Tạo feature branch git checkout -b feature/awesome-feature # Naming convention: # feature/user-authentication # fix/csrf-middleware-double-middleware # docs/api-documentation # refactor/remove-dead-code ``` ### Pull Request Workflow ```bash # 1. Commit changes git add . git commit -m "feat(auth): implement phone OTP login" # 2. Push to origin git push origin feature/awesome-feature # 3. Open PR on GitHub # - Title: Short summary (max 70 chars) # - Description: Why, what changed, how to test # - Link related issues: Fixes #GOO-7 # - Request reviewers: team lead, domain expert # 4. Address review feedback git add . git commit -m "refactor(auth): address PR feedback" git push # 5. Merge when approved # - Squash commits if many small fixes # - Delete branch after merge ``` ### Protected Branch Rules `main` và `develop` branches yêu cầu: - ✅ All CI checks pass (lint, typecheck, test, build) - ✅ 1 approval từ code owner - ✅ Dismiss stale PR approvals - ✅ Branches must be up to date before merge - ❌ Force push không được phép --- ## Quy Ước Commit Theo chuẩn **[Conventional Commits](https://www.conventionalcommits.org/)**: ``` ():