Git Flow có 5 loại branch: main (production), develop (tích hợp code), feature/ (tính năng mới), release/ (chuẩn bị release), hotfix/* (sửa lỗi khẩn cấp).
- Trunk-based Development là hướng ngược lại: commit thẳng vào
mainvới feature flags, phù hợp team CI/CD mature. - Thực tế phổ biến nhất: feature branch từ develop → PR review → merge develop → staging → merge main → production.
- Naming convention quan trọng:
feature/JIRA-123-add-logingiúp trace thay đổi về requirement.
- Git Flow uses 5 branch types:
main(production),develop(integration),feature/(new features),release/(release prep),hotfix/*(urgent bug fixes). - Trunk-based Development is the opposite: commit directly to
mainbehind feature flags — suited for mature CI/CD teams. - The most common real-world flow: feature branch off develop → PR review → merge to develop → staging → merge to main → production.
- Naming convention matters:
feature/JIRA-123-add-loginhelps trace changes back to requirements.