Cách Viết Git Commit Convention Chuẩn
Type | Ý Nghĩa | Ví Dụ |
---|---|---|
feat |
Thêm tính năng mới | feat(cart): add shopping cart checkout |
fix |
Sửa lỗi | fix(api): handle null response error |
docs |
Chỉ thay đổi tài liệu (README, comment code, v.v.) | docs(readme): update installation guide |
style |
Thay đổi định dạng code (không ảnh hưởng logic) | style(css): format with prettier |
refactor |
Tái cấu trúc code (không thêm tính năng, không sửa lỗi) | refactor(auth): simplify login logic |
test |
Thêm hoặc sửa test case | test(unit): add tests for user model |
chore |
Các thay đổi linh tinh (cập nhật dependency, config, v.v.) | chore(deps): update lodash to v4.17.21 |
perf |
Cải thiện hiệu suất | perf(db): optimize query performance |
ci |
Thay đổi cấu hình CI/CD | ci(github): add linting to workflow |
build |
Thay đổi liên quan đến hệ thống build (webpack, npm scripts, v.v.) | build(webpack): add production config |