Naming Convention for Git Branch

แนวทางการตั้งชื่อสำหรับ git branch ตามข้อตกลงร่วมกัน

PrefixDescriptionExample Branch Name

feature/

New feature development

feature/new-login-page, feature/payment-gateway

fix/

Bug fixes

fix/issue-123, fix/bug-in-payment-process

hotfix/

Critical fixes in production

hotfix/production-bug, hotfix/security-issue

docs/

Documentation updates or corrections

docs/update-installation-guide, docs/fix-typo-in-readme

refactor/

Code refactoring

refactor/restructure-auth-module, refactor/optimize-database-query

chore/

General tasks or chores

chore/update-dependencies, chore/cleanup-codebase

test/

Testing-related tasks or changes

test/add-unit-tests, test/fix-integration-tests

release/

Preparing for a release or deployment

release/version-1.0.0, release/prepare-for-deployment

experiment/

Experimental changes or ideas

experiment/new-algorithm, experiment/ui-ux-improvements

fixup/

Fixing mistakes or cleaning up commits

fixup/fix-bad-commit, fixup/squash-commits

revert/

Reverting changes

revert/revert-feature-branch, revert/revert-bad-commit

temp/

Temporary branches for short-term work

temp/debugging-session, temp/quick-fix

vendor/

Integrating third-party libraries or updates

vendor/update-library-x, vendor/merge-library-y

feature-typo/

Introducing a new feature with a small typo

feature-typo/login-page, feature-typo/payment-gateway

  • feature/ : ใช้สำหรับการพัฒนา Feature ใหม่

  • fix/ : ใช้สำหรับการแก้ไขบั๊ก (Bug fixes)

  • hotfix/ : ใช้สำหรับการแก้ไขบั๊กที่เกิดขึ้นในโปรดักชันที่กำลังใช้งาน (Critical fixes in production)

  • docs/ : ใช้สำหรับการอัพเดทหรือแก้ไขเอกสาร

  • refactor/ : ใช้สำหรับการ Refactor โค้ด

  • chore/ : ใช้สำหรับงานทั่วไปหรือหน้าที่ทั่วไป

  • test/ : ใช้สำหรับการเปลี่ยนแปลงที่เกี่ยวข้องกับการทดสอบ

  • release/ : ใช้สำหรับการเตรียมตัวสำหรับการเผยแพร่หรือการนำไปใช้งาน

  • experiment/ : ใช้สำหรับการทดลองเปลี่ยนแปลงหรือไอเดียใหม่

  • fixup/ : ใช้สำหรับการแก้ไขข้อผิดพลาดหรือทำความสะอาด Commits

  • revert/ : ใช้สำหรับการย้อนกลับการเปลี่ยนแปลง

  • temp/ : ใช้สำหรับ Branch ชั่วคราวสำหรับงานชั่วคราว

  • vendor/ : ใช้สำหรับการรวมไลบรารีหรืออัปเดตไลบรารีจากแหล่งภายนอก

  • feature-typo/ : ใช้สำหรับการแนะนำคุณลักษณะใหม่ที่มีการพิมพ์ผิด

Last updated