Commit Message Guidelines
Example of a properly formed commit message:
JIRA-123 Short (72 chars or less) summary
More details about the change, including functional and/or technical
explanation. Wrap it to 72 characters. The blank line separating the
summary from the body is critical (unless you omit the body entirely).
Further paragraphs come after blank lines.
- Use bullet points if needed (preceded with hyphen or an asterisk, use
MarkDown notation if possible)
Fix color of the inbox message on the welcome screen
[#123] Add option to fix myself a coffee with a button
When a button is pressed on the mobile, the remote coffee machine
will start coffee preparation process
Fixed proj-123
Fixed a bug in class Z.
- enabled the flag
Guidance for well-written commit messages:
- separate subject from body with a blank line
- use the imperative mood in the subject line, e.g. "Fix broken image" instead of "Fixed broken image"
- do not end the subject line with a period
- capitalize the subject line and each paragraph
- wrap lines at 72 characters
Use the body to explain what and why you have done something. In most cases, you can leave out details about how a change has been made. Some questions that can aid in formulating explanation section:
- The first commit line is the most important
- Describe why a change is being made
- How does it address the issue?
- Do not assume the reviewer understands what the original problem was
- Do not assume the code is self-evident/self-documenting
- Read the commit message to see if it hints at improved code structure
- Describe any limitations of the current code
Referencing ticket systems:
[#123] Refer to GitHub issue...
JIRA-123 Refer to Jira ticket with project identifier JIRA...
Fixes #123, JIRA-345 by introducting new class parameter.
Sources