-
Notifications
You must be signed in to change notification settings - Fork 0
Writing good commit messages
Kerem Bozdas edited this page Sep 5, 2013
·
4 revisions
Acknowledgement: This document is based on erlang/otp's wiki page "Writing good commit messages". (Thanks folks!)
Good commit messages serve at least three important purposes:
- To speed up the reviewing process.
- To help us write a good release note.
- To help the future maintainers of yakut-project/yakut (it could be you!), say five years into the future, to find out why a particular change was made to the code or why a specific feature was added.
Structure your commit message like this:
#1 Summarize clearly in one line what the commit is about
Describe the problem the commit solves or the use
case for a new feature. Justify why you chose
the particular solution. (Optional)
- Write the summary line and description in imperative mood. Write “fix”, “add”, “change” instead of “fixed”, “added”, “changed”.
- Write commit messages in sentence case, not title case (i.e. do not capitalize every word of the sentence).
- Mention relating issue number(s) if commit message is related to particular issue(s).
- If you're writing a multiple line commit message, always leave the second line blank.
- Line break the commit message (to make the commit message readable without having to scroll horizontally in
gitk
).
- Don’t end the summary line with a period.
- Don't start commit messages with a lowercase letter.