How to write good git commit messages
It’s totally true that the commit messages of a repo become less and less informative as project goes. The article, How to Write a Git Commit Message, gives good guidance to address the issue.
The seven suggestions are,
- Use a blank line to separate title.
- Don’t use period at the end of the title.
- Capitalize the title.
- Use imperative mood to write the title.
- Keep the title in 50 words.
- Wrap the body in 70 words a line.
- Use the body to explain what and why instead of how.
Further suggestions are,
- Prefer to small checking with [WIP] in title.
- Think of your reviewer by review your pull request first to ensure it’s reviewable.
- Use
git rebase -i HASH
to revise and squarsh commits for a releasable feature.