Commit Message Conventions ========================== These rules are adopted from [the AngularJS commit conventions](https://docs.google.com/document/d/1QrDFcIiPjSLDn3EL15IJygNPiHORgU1_OOAqWjiDU5Y/). * [Goals](#goals) * [Generating CHANGELOG.md](#generating-changelogmd) * [Recognizing unimportant commits](#recognizing-unimportant-commits) * [Provide more information when browsing the history](#provide-more-information-when-browsing-the-history) * [Format of the commit message](#format-of-the-commit-message) * [Subject line](#subject-line) * [Allowed ``](#allowed-type) * [Allowed ``](#allowed-scope) * [`` text](#subject-text) * [Message body](#message-body) * [Message footer](#message-footer) * [Breaking changes](#breaking-changes) * [Referencing issues](#referencing-issues) * [Examples](#examples) Goals ----- * allow generating CHANGELOG.md by script * allow ignoring commits by git bisect (not important commits like formatting) * provide better information when browsing the history Generating CHANGELOG.md ----------------------- We use these three sections in changelog: new features, bug fixes, breaking changes. This list could be generated by script when doing a release. Along with links to related commits. Of course you can edit this change log before actual release, but it could generate the skeleton. List of all subjects (first lines in commit message) since last release: ```bash git log HEAD --pretty=format:%s ``` New features in this release ```bash git log HEAD --grep feature ``` ### Recognizing unimportant commits These are formatting changes (adding/removing spaces/empty lines, indentation), missing semi colons, comments. So when you are looking for some change, you can ignore these commits - no logic change inside this commit. When bisecting, you can ignore these by: ```bash git bisect skip $(git rev-list --grep irrelevant HEAD) ``` ### Provide more information when browsing the history This would add kinda “context” information. Look at these messages (taken from last few angular’s commits): * Fix small typo in docs widget (tutorial instructions) * Fix test for scenario.Application - should remove old iframe * docs - various doc fixes * docs - stripping extra new lines * Replaced double line break with single when text is fetched from Google * Added support for properties in documentation All of these messages try to specify where is the change. But they don’t share any convention... Look at these messages: * fix comment stripping * fixing broken links * Bit of refactoring * Check whether links do exist and throw exception * Fix sitemap include (to work on case sensitive linux) Are you able to guess what’s inside ? These messages miss place specification... So maybe something like parts of the code: docs, docs-parser, compiler, scenario-runner, … I know, you can find this information by checking which files had been changed, but that’s slow. And when looking in git history I can see all of us tries to specify the place, only missing the convention. --- Format of the commit message ---------------------------- ``` ():