Commits & history
Fill-gap20 min
Commits & history
Git is a diary of small, true sentences:
git add -m .
git commit -m "feat(roadmaps): add lesson content to seed"
git log --onelineA commit should be one idea — the diff reads like a paragraph, not a chapter. Messages in the imperative ("add", not "added") because they complete the sentence "this commit will…".
History is not bookkeeping; it is your undo button, your code review context, and your teammate's orientation. Write commits you would want to read at 3am.
Exercise
Read this repo's git log --oneline. Find the best and worst commit message. Rewrite the worst one.