Commit Message Spec

注意
本文最后更新于 2023-11-17,文中内容可能已过时。

Commit messages are short descriptions of changes to a repository. We should follow certain standards to effectively describe changes, such as the Conventional Commits specification based on the Angular convention that is most used on GitHub, or each development team can simplify and formulate their own commit specification. This is not only conducive to the automatic generation of Changelog in the later stage, but more importantly, when a bug occurs, the entire warehouse can be quickly checked, the problem point can be accurately located, and the version can be reverted.

1 Format

[{emoji} ]{type}[({module})]: {subject within 50 words}[ (#{issue/pull request})]

example:

  • : tada: Feat: add shortcode fixit-encryptor shortcode (#123)
  • : arrow_up: Chore(libs): update Artalk from 2.2.12 to 2.3.4 (#150)

2 Emoji

3 Message

EmojiTypeExampleDescription (No Ambiguous)
🎉
FeatFeat: 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
🐛
🚧
🚨
FixFix: fix {bug description}Fix known bugs
🎨
💄
✏️
StyleStyle: Typesetting/CSS style {optimizing content}Changes that do not affect code operation, such as code layout and style change
♻️RefactorRefactor: 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
PerfPerf: improve performance {function name}, {improve content}Optimize code performance
RevertRevert: restore version {commit message of restore version}Restore the version of one commit
📝
✏️
DocsDocs: revise comments/update documentsAdjustment of documents and notes
🔧ChoreChore: update plugin versionChanges in the construction process or auxiliary tools

相关内容

Buy me a coffee~
Lruihao 支付宝支付宝
Lruihao 微信微信
0%