Git 提交规范

遇到的问题

在项目中采用 git 管理代码版本时,突然不能进行提交(git commit)。
报错信息如下:
在这里插入图片描述

ERROR invalid commit message format.
Proper commit message format is required for automated changelog generation.

Git 规范

合法的提交日志格式如下(emoji 和 模块可选填):

 [<emoji>] [revert: ?]<type>[(scope)?]: <message>

💥 feat(模块): 添加了个很棒的功能
🐛 fix(模块): 修复了一些 bug
📝 docs(模块): 更新了一下文档
🌷 UI(模块): 修改了一下样式
🏰 chore(模块): 对脚手架做了些更改
🌐 locale(模块): 为国际化做了微小的贡献

其他提交类型: refactor, perf, workflow, build, CI, typos, tests, types, wip, release, dep

具体查看 https://github.com/vuejs/core/blob/main/.github/commit-convention.md

示例

在提交信息前加上类型(前缀)

git commit -m "UI: 文档管理-知识体系-页面搭建"
posted @ 2023-10-17 15:27  辰梦starDream  阅读(66)  评论(0编辑  收藏  举报  来源