คอมมิตเป็นขั้นเล็ก ๆ
คอมมิตเล็ก ๆ คือตาข่ายนิรภัยของคุณ แต่ละอันควรเป็นขั้นตอนที่มีความสอดคล้องกันเพียงหนึ่งเดียว:
git commit -m "Add star button to item cards"
git commit -m "Toggle favorite state on star click"
git commit -m "Add favorites counter to list header"
git commit -m "Persist favorites in localStorage"
ถ้าขั้นตอนที่ 4 พังไป สามขั้นตอนแรกของคุณยังปลอดภัยอยู่ และคุณแทบไม่เสียอะไรเลย คอมมิตที่ใหญ่และนาน ๆ ครั้งคือสาเหตุที่ทำให้คนกลัวที่จะแตะโค้ดของตัวเอง