Commit Message Guidelines
March 18, 2025 ยท View on GitHub
Atomic commits are preferred.
Subject/Title
- Separate the title/subject of the commit message from the body of the commit message with a blank line.
- Try to keep the title/subject descriptive and concise.
- Capitalize the title/subject line, make sure it completes the sentence "if applied, this commit...", and don't end the line with a period.
Body
- Explain what the commit does.
- Explain why the commit does what it does.
- Add any additional details that could be useful.
Example
Add commit message guidelines
What: Adds guidelines for commit messages to be used by contributors in all of our projects.
Why: This keeps things standardized and predictable and encourages people to include the very important context of why they're making their changes.
Note: The example for the body of the commit message doesn't have to be followed exactly, the most important part is that the commit message is clear and informative, but I find the headings useful for saving brain power by essentially just giving me a form to fill out, and helping make sure I think about what context I need to convey so that others (including my future self) will understand what I'm doing.