Git Conventional Commits (Git代码提交说明规范)

Conventional Commits 是关于Git Commit 提交代码时, 填写的说明文字的一个规范. 这个规范提供了一套易于理解和使用的规则, 通过描述提交消息中的特性, 修复和重大更改, 创建易于阅读的提交历史, 也方便在其之上编写自动化工具.

[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:6177f192-adfc-4d72-adf4-b56b14b4bc14

[En]

[TencentCloudSDKException] code:FailedOperation.ServiceIsolate message:service is stopped due to arrears, please recharge your account in Tencent Cloud requestId:a7b73c4b-f46a-4b5f-8b29-bf76680b4992

<type>[optional scope]: <description>

[optional body]

[optional footer(s)]
</description></type>
feat: add hat wobble
^--^  ^------------^
|     |
|     +-> &#x7B80;&#x5355;&#x7684;&#x63CF;&#x8FF0;
|
+-------> &#x7C7B;&#x578B;: chore, docs, feat, fix, refactor, style, or test.

前缀说明

各种前缀的使用场景:

  • feat: 面向用户的功能的新特性, 不包括项目构建的新特性
  • fix: bug修复
  • docs: 任何文档相关的修改
  • style: 格式方面的改动, 不涉及代码逻辑的改动
  • refactor: 重构类型的修改, 例如修改一个变量名
  • test: 测试代码相关的改动, 例如增加测试案例, 重构测试代码等
  • chore: 日常工作, 例如更新组件版本号, 发布版本, 打标签等

Commit message with description and breaking change footer

feat: allow provided config object to extend other configs

BREAKING CHANGE: extends key in config file is now used for extending other config files

Commit message with ! to draw attention to breaking change

feat!: send an email to the customer when a product is shipped

Commit message with scope and ! to draw attention to breaking change

feat(api)!: send an email to the customer when a product is shipped

Commit message with both ! and BREAKING CHANGE footer

chore!: drop support for Node 6

BREAKING CHANGE: use JavaScript features not available in Node 6.

Commit message with no body

docs: correct spelling of CHANGELOG

Commit message with scope

feat(lang): add Polish language

Original: https://www.cnblogs.com/milton/p/16611492.html
Author: Milton
Title: Git Conventional Commits (Git代码提交说明规范)

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/562970/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球