-
Notifications
You must be signed in to change notification settings - Fork 494
How to format your commit messages
Example commit message: Example: "[FIX] Register: RT-1000 fix bug in registration flow"
Typical commit types: [FEATURE] - add or modifies a feature [FIX] - fix a bug [TEST] - add test(s) [DOC] - add documentation [TASK] - task that matches none of the above
Specify the part of the code the change touches. Examples: “Auth”, “Send”, “Trade”...
If it relates to a JIRA task, put the JIRA task number next.
First line should be a title. The title should be short (50 chars or less) and be a summary of the change. Followed by a more detailed explanatory text, if necessary. Wrap it to about 72 characters or so.
In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely).
Write your commit message in the imperative: "Fix bug" and not "Fixed bug" or "Fixes bug." This convention matches up with commit messages generated by commands like git merge and git revert.
Message length rules and formatting inspired by: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html http://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message