Skip to content

Commit Conventions / 提交信息规范

Cinux 遵循 Conventional Commits 规范。

Format / 格式

type(scope): description
  • type(必填):提交类型
  • scope(可选):影响范围
  • description(必填):简短描述,不超过 72 字符

Types / 提交类型

type含义是否影响代码
feat新功能
fix缺陷修复
doc文档更新
style代码格式(不影响逻辑)
refactor重构(不新增功能也不修复)
perf性能优化
test测试补充或修正
chore构建、工具、依赖维护
ciCI 配置变更

Scopes / 范围

scope说明
kernel内核核心逻辑
boot引导加载
mm内存管理
fs文件系统
driver设备驱动
sched进程调度
user用户态程序
test测试框架
doc文档
build构建系统(CMake)
tools辅助工具

scope 为可选字段。当改动涉及多个模块时可以省略。

Breaking Changes / 破坏性变更

在 type 后加 ! 或在 footer 中写 BREAKING CHANGE:

feat(mm)!: replace bitmap allocator with buddy system

BREAKING CHANGE: pmm_alloc/pmm_free API signature changed

Examples / 示例

feat(fs): add ext2 write support
fix(mm): fix page fault in pmm_free when addr is unaligned
doc: update tutorial 028 for ext2 filesystem
style: auto-format with clang-format
refactor(kernel): extract common interrupt handler logic
perf(sched): optimize round-robin scheduling with bitmap queue
test(mm): add stress test for physical memory manager
chore: upgrade GCC toolchain requirement to 14
ci: add kernel integration test job

PR Title / PR 标题规范

PR 标题应与 squash merge 后生成的 commit message 一致:

feat(fs): add ext2 write support

当一个 PR 包含多个 commit 时,PR 标题应概括整体改动,squash merge 后这些 commit 将合并为一个。

Guidelines / 编写指南

  • description 使用祈使句("add feature" 而非 "added feature")
  • 不以句号结尾
  • 首字母小写
  • 用英文撰写,与代码风格保持一致
  • 每个 commit 只做一件事——如果改动涉及多个不相关模块,拆分为多个 commit

035_multi_terminal-40-g5d72b8b · 5d72b8b · 2026-06-26