commit ที่ดีมีความ โฟกัส (การเปลี่ยนแปลงเชิงตรรกะหนึ่งอย่าง) พร้อม ข้อความที่ชัดเจน ที่อธิบายว่าอะไรเปลี่ยนแปลงและทำไม commit และข้อความที่สร้างมาอย่างดีทำให้ประวัติของโปรเจกต์อ่านง่าย มีประโยชน์ต่อการเข้าใจการเปลี่ยนแปลง การ debug และการทำงานร่วมกัน
commit message ที่ดี
GOOD message structure:
Short summary line (~50 chars, imperative mood, capitalized, no period)
<blank line>
Optional body: explain WHAT and WHY (not how — the code shows how),
wrap at ~72 chars. Reference issues if relevant.
✅ GOOD:
Add user email validation to registration form
Validate email format before submission to prevent invalid
accounts. Fixes #142.
❌ BAD:
"fixed stuff", "update", "asdf", "changes", "wip"
→ vague, uninformative — useless when reviewing history later
