java/.trae/rules/git-commit-message.md

24 lines
1.0 KiB
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.

---
alwaysApply: true
scene: git_message
---
1. 结构固定模板
统一遵循:[类型](模块): 简短描述 | 详细补充说明
头部类型1 个英文单词,限定固定枚举,不可自定义新词
模块:对应业务 / 文件目录无模块填global
简短描述中文≤50 字,主谓宾完整,说明本次改动核心行为
补充说明(可选):换行分隔,记录改动细节、关联需求、修复场景
2. 类型枚举(仅允许以下)
表格
类型 使用场景
feat 新增功能、页面、接口、交互逻辑
fix Bug 修复、异常报错、逻辑漏洞、兼容问题
opt 性能优化、代码精简、逻辑重构、执行效率提升
ui 界面样式、布局、配色、图标、动画调整
doc 注释、文档、README、接口文档更新
test 单元测试、集成测试、测试用例新增 / 修改
build 打包配置、依赖版本、构建脚本调整
style 仅格式调整:空格、换行、缩进、标点,无逻辑变更
revert 回滚上一次提交,后附回滚 commit 编号