작은 단위로 커밋하기
작은 커밋은 당신의 안전망이다. 각 커밋은 하나의 일관된 단계여야 한다:
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단계가 엇나가도 처음 세 단계는 안전하고 잃는 게 거의 없다. 크고 드문 커밋은 사람들이 자기 코드를 건드리기 두려워하게 되는 길이다.