How to write a good commit message
posted Tue 5 Dec 2023 by Michael Galloy under ProgrammingGit commit messages can be important for browsing the commit history of a repo. This article gives seven basic rules for creating good commit messages:
- Separate subject from body with a blank line
- Limit the subject line to 50 characters
- Capitalize the subject line
- Do not end the subject line with a period
- Use the imperative mood in the subject line
- Wrap the body at 72 characters
- Use the body to explain what and why vs. how
There are explanations for why each of these rules is a good idea.