How to Write Useful Commit Messages

refactoringenglish.com2025年03月07日 00:00

Effective commit messages simplify the code review process and aid long-term code maintenance. Unfortunately, commit messages don’t get much respect, so the world is littered with useless messages like Fix bug or Update UI.

There’s no widespread agreement about what makes a good commit message or why it’s useful, so I’m sharing my thoughts based on my 20 years of experience as a software developer.

An example of a useful commit message

Here’s an example of a useful, effective commit message: