18 March 2025

Quick Tip: Git Commit Messages

Use the imperative mood in your commit messages. Not 'Added feature' but 'Add feature'. Not 'Fixes bug' but 'Fix bug'. It makes the history read more naturally.

Git commit messages follow a convention that works surprisingly well: use the imperative mood.

Instead of:

  • "Added feature"
  • "Fixed bug"
  • "Updating documentation"

Use:

  • "Add feature"
  • "Fix bug"
  • "Update documentation"

This makes the commit history read like a changelog: "Add feature X, Fix bug Y, Update documentation Z".

Plus, it's what Git's own tools expect—git rebase -i and git merge --squash both work better with imperative commits.


Found this helpful? Share it with your team!