Files
geg-gas-web/.claude/commands/commit-msg.md

35 lines
850 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

根据当前 git 暂存区或工作区的改动,生成符合项目规范的 git 提交信息。
## 步骤
1. 运行 `git diff --staged`,如果暂存区为空则运行 `git diff`,获取当前改动内容
2. 分析改动的性质和范围
3. 生成提交信息
## 提交信息规范
遵循 Conventional Commits类型如下
- `feat`: 新增功能
- `fix`: 修复 bug
- `refactor`: 重构(不影响功能)
- `style`: 样式调整
- `docs`: 文档更新
- `chore`: 构建/工具/依赖变更
## 输出格式
只输出提交信息本身,不要多余说明:
```
<type>: <简洁的中文描述>
- 改动点1可选改动较多时列出
- 改动点2
```
要求:
- 主题行不超过 50 个字
- 使用中文描述
- 主题行动词用"新增/修复/优化/重构/调整"等,不用"添加了/修改了"这类过去式