Files
hepu/.gitmessage
aomin 9b966180ca chore(repo): 加提交信息模板,git commit 自动带出格式提示
格式与 CONTRIBUTING.md 第二节一致:<类型>(<范围>): <说明>,六种类型、
九个模块范围、四条示例。配 commit.template 后不带 -m 提交即可看到提示。

新克隆的人执行一次 git config commit.template .gitmessage 即可生效。
2026-11-13 17:40:33 +08:00

34 lines
1.5 KiB
Plaintext
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.
# ─────────────────────────────────────────────────────────────
# 提交信息格式:<类型>(<范围>): <一句话说明>
#
# 类型只有六种:
# feat 新增能力
# fix 修缺陷
# refactor 不改行为的重构
# docs 文档与接口契约
# chore 构建、依赖、配置、仓库杂务
# revert 回退
#
# 范围写模块名,不写人名:
# internal /internal/** 五个接入接口
# contract docs/contract 下的接口契约
# migration Flyway 迁移脚本
# auth 鉴权、权限、加解密
# alarm 告警引擎与状态机
# command 命令下发与结果回收
# demo 演示前端与设备模拟器
# repo 仓库级文件(.gitignore、README、规范)
#
# 示例:
# fix(internal): I-12 原文缺失返回 404 而不是 500
# feat(alarm): 解除事件按 dev_id + rule_key 关闭组合规则
# docs(contract): J-00 升级 1.8.1,OpenAPI 与正文同步
# chore(migration): 新增 V1.0.29 补充 alarm_source_event 索引
#
# 正文写"为什么这么改、代价是什么",不复述代码本身。
# 一条提交只做一件事;不写"按某人要求修改"。
#
# 以 # 开头的行不会进入提交信息。保存退出即完成。
# ─────────────────────────────────────────────────────────────