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!
