Imperative Mood Drill
Converting past-tense and vague descriptions to precise, imperative commit messages
Imperative mood rules
- Use the base verb form: Add, Fix, Remove, Update, Refactor — not Added, Fixing, Removed
- Test: "If applied, this commit will [your message]" — it should complete the sentence
- No personal pronouns: never "I added", "We fixed"
- Be specific: "fix(auth): prevent null pointer when user has no roles" beats "fix: bug"
- Common imperative verbs: Add, Fix, Remove, Update, Refactor, Extract, Move, Rename, Revert, Bump
Question 0 of 5
Convert this past-tense commit description to imperative mood: "Added validation for email format in registration form"
Add validation for email format in registration form — imperative, base verb form. Why imperative mood?
- Git itself uses imperative: "Merge branch...", "Revert...", "Update submodule..."
- The convention reads as a command completing the sentence: "If applied, this commit will Add validation for email format"
- Avoids ambiguity — past tense ("Added") and progressive ("Adding") both fail the sentence test
Which of these commit messages uses the correct imperative mood?
Remove deprecated API endpoints from the auth module — base verb, no suffix. Common mistakes:
- ❌ Past tense: "Removed", "Fixed", "Updated", "Added", "Changed"
- ❌ Present progressive: "Removing", "Fixing", "Updating"
- ❌ Verbose opening: "This commit removes..." — cut "This commit"
- ✅ Imperative: "Remove", "Fix", "Update", "Add", "Change", "Refactor", "Extract"
Your colleague writes: "I updated the README to document the new CLI flags". What are the two problems with this commit message?
Personal pronoun "I" + past tense "updated" are both wrong. Imperative mood rules:
- ❌ No personal pronouns: "I added", "We fixed", "They removed" — commits have no subject
- ❌ No past tense: "updated", "fixed", "added"
- ✅ Correct: "docs: document new CLI flags in README"
Which commit message is the most precise and specific?
fix(auth): prevent null pointer when user has no roles assigned is precise and actionable. Why vague commit messages are harmful:
- A future developer bisecting the git log to find a regression cannot use "misc fixes" as signal
- "Fix things" provides zero information about what was broken or where
- The precise message lets a reviewer know exactly what to test and where to look in the diff
You are writing a commit for updating npm dependencies to their latest patch versions. Which message is best?
chore: bump dependencies to latest patch versions uses correct type, imperative mood, and specific description. Breaking down the options:
- ✅ chore — correct type for dependency updates (not a user-facing feat or fix)
- ✅ "bump" — standard verb for dependency version increases
- ✅ "patch versions" — distinguishes this from minor/major updates (important for semver)