Commit messages are short descriptions of changes to a repository. We should follow certain standards to effectively describe changes, such as the most used Angular Commit specification on GitHub, or each development team can simplify and formulate their own submission specifications, which is not only conducive to the automatic generation of Changelog in the later stage, but more importantly, when it appears When there is a bug, the entire warehouse can be quickly checked, the problem point can be accurately located, and the version can be returned.
[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]
example:
GitEmoji
Emoji | Type | Example | Description (No Ambiguous) |
---|---|---|---|
🎉✨ | Feat | Feat: add {feature} | new feature |
🚚 | Feat: adjust/migrate {feature name}, {change details} | For the adjustment feature, it is necessary to describe the current situation (before) and after adjustment (after) | |
🔥 | Feat: delete {feature name}, {deletion reason} | If the feature is deleted, the reason for deletion must be explained | |
🐛🚧🚨 | Fix | Fix: fix {bug description} | Fix known bugs |
🎨💄✏️ | Style | Style: Typesetting/CSS style {optimizing content} | Changes that do not affect code operation, such as code layout and style change |
♻️ | Refactor | Refactor: override {feature name} | It is neither a new function nor a code change to fix a bug. Simply rewriting the code of a function does not affect the function result |
⚡ | Perf | Perf: improve performance {function name}, {improve content} | Optimize code performance |
⏪ | Revert | Revert: restore version {commit message of restore version} | Restore the version of one commit |
✏✏️ | Docs | Docs: revise comments/update documents | Adjustment of documents and notes |
🔧 | Chore | Chore: update plugin version | Changes in the construction process or auxiliary tools |