git-commit-format

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Git Commit Format Skill

Git 提交格式技能

Generates a commit message (title + description) from a description of changes.

根据变更描述生成提交信息(标题+描述)。

Conventions

规范

Commit Title

提交标题

Follows Conventional Commits spec:
{type}({optional scope}): {short imperative description}
  • Types:
    feat
    ,
    fix
    ,
    chore
    ,
    refactor
    ,
    docs
    ,
    style
    ,
    test
    ,
    perf
    ,
    ci
    ,
    build
    ,
    revert
  • Use imperative mood: "add", "fix", "remove" — not "added", "fixed", "removed"
  • Max ~72 characters
  • All lowercase except proper nouns
  • No period at the end
  • Example:
    feat(auth): add biometric login support
遵循Conventional Commits规范:
{type}({optional scope}): {short imperative description}
  • 类型
    feat
    ,
    fix
    ,
    chore
    ,
    refactor
    ,
    docs
    ,
    style
    ,
    test
    ,
    perf
    ,
    ci
    ,
    build
    ,
    revert
  • 使用祈使语气:“add”“fix”“remove”——而非“added”“fixed”“removed”
  • 最多约72个字符
  • 除专有名词外全部小写
  • 结尾无句号
  • 示例:
    feat(auth): add biometric login support

Commit Description

提交描述

Bullet list using past tense action words:
* Fixed ...
* Added ...
* Changed ...
* Removed ...
  • Only include bullets that apply to the actual changes
  • Keep each bullet concise and specific
  • Allowed verbs:
    Fixed
    ,
    Added
    ,
    Changed
    ,
    Removed
    ,
    Updated
    ,
    Refactored
    ,
    Migrated
    ,
    Deprecated
  • Always in English
  • Never include
    Co-Authored-By
    ,
    Signed-off-by
    , or any trailer attributing the commit to an AI agent or tool

使用过去式动词的项目符号列表:
* Fixed ...
* Added ...
* Changed ...
* Removed ...
  • 仅包含与实际变更相关的项目符号
  • 每个项目符号简洁明确
  • 允许使用的动词:
    Fixed
    ,
    Added
    ,
    Changed
    ,
    Removed
    ,
    Updated
    ,
    Refactored
    ,
    Migrated
    ,
    Deprecated
  • 始终使用英文
  • 禁止包含
    Co-Authored-By
    Signed-off-by
    或任何将提交归因于AI代理或工具的尾部信息

Type Selection Guide

类型选择指南

TypeWhen to use
feat
New functionality
fix
Bug fix
refactor
Code change with no behavior change
chore
Config, deps, tooling, maintenance
test
Adding or updating tests
docs
Documentation only
style
Formatting, whitespace
perf
Performance improvement
ci
CI/CD changes
build
Build system changes
revert
Reverting a previous commit
If the changes span multiple concerns, suggest splitting into separate commits.

类型使用场景
feat
新增功能
fix
修复Bug
refactor
代码变更但无行为变化
chore
配置、依赖、工具、维护类变更
test
添加或更新测试
docs
仅文档变更
style
格式调整、空白字符修改
perf
性能优化
ci
CI/CD流程变更
build
构建系统变更
revert
回滚之前的提交
如果变更涉及多个方面,建议拆分为多个独立提交。

Output Format

输出格式

feat(flutter): upgrade Flutter SDK to v3.19

* Updated Flutter SDK version to 3.19
* Changed minimum iOS deployment target to 14.0
* Fixed deprecated API usages after upgrade
* Removed unused legacy plugins
The commit message must end after the bullet list. Do not append any
Co-Authored-By
,
Signed-off-by
, or AI attribution trailers.

feat(flutter): upgrade Flutter SDK to v3.19

* Updated Flutter SDK version to 3.19
* Changed minimum iOS deployment target to 14.0
* Fixed deprecated API usages after upgrade
* Removed unused legacy plugins
提交信息必须在项目符号列表后结束。禁止附加任何
Co-Authored-By
Signed-off-by
或AI归因的尾部信息。

Examples

示例

User: "I upgraded Flutter and had to fix some deprecated APIs and update the iOS target"
feat(flutter): upgrade Flutter SDK to v3.19

* Updated Flutter SDK version to 3.19
* Changed minimum iOS deployment target to 14.0
* Fixed deprecated API usages after upgrade

User: "Fixed a crash on login when the user has no internet"
fix(auth): handle login crash when offline

* Fixed crash on login screen when no internet connection is available
* Added offline error state to login flow
用户:“我升级了Flutter,不得不修复一些废弃的API并更新iOS目标版本”
feat(flutter): upgrade Flutter SDK to v3.19

* Updated Flutter SDK version to 3.19
* Changed minimum iOS deployment target to 14.0
* Fixed deprecated API usages after upgrade

用户:“修复了用户无网络时登录崩溃的问题”
fix(auth): handle login crash when offline

* Fixed crash on login screen when no internet connection is available
* Added offline error state to login flow