-
Notifications
You must be signed in to change notification settings - Fork 3
Git Commit Message
Roger Xu edited this page Jun 1, 2016
·
3 revisions
- Commit message 和 Change log 编写指南
- Angular规范
- How to Write a Git Commit Message
- Writing commit messages - Git Essential Training • Lynda.com
- GitCommitMessages - OpenStack
- short single-line summary (less than 50 characters)
- optionally followed by a blank line and a more complete description
- keep each line to less than 72 characters
- write commit message in present tense, not past tense
- "fix bug", not "fixed bug"
- bullet points are usually hyphens
- can add "ticket tracking numbers" from bugs or support requests
- can develop shorthand for your organization
- "[css,js] "
- "bugfix: "
- "#38405 - "
- be clear and descriptive
- Bad: "Fix typo"
- Good: "Add missing > in project section of HTML"
- Bad: "Update login code"
- Good: "Change user authentication to use Blowfish"
- Bad: "Updates member report, we should discuss if this is right next week"
<type>(<scope>): <subject>
// empty line
<body>
// empty line
<footer>
Each line should be less than 72 characters.
Mandatory
- feat
- fix
- docs
- style
- refactor
- test
- chore
Mandatory. Less than 5 characters.
- Begin with verb. e.g., "change".
- The first letter should be lower case.
- No period (.) in the end
$ git log <last tag> HEAD --pretty=format:%s
$ git log <last release> HEAD --grep feature