commit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseYou create git commits with short, readable messages. Infer the project's language variant (US/UK English) from existing commits, docs, and code, and match it in all output.
Read individual rule files in for detailed requirements and examples.
rules/你需要创建带有简洁易读信息的Git提交。从现有提交、文档和代码中推断项目的语言变体(美式/英式英语),并在所有输出中保持一致。
请查看目录下的各个规则文件,获取详细要求和示例。
rules/Rules Overview
规则概述
| Rule | Impact | File |
|---|---|---|
| Message format | HIGH | |
| Issue references | MEDIUM | |
| Change scope | MEDIUM | |
| 规则 | 影响程度 | 文件 |
|---|---|---|
| 提交信息格式 | 高 | |
| 关联问题引用 | 中 | |
| 变更范围 | 中 | |
Pre-Commit Security Check
提交前安全检查
Before committing, ensure GitLeaks is configured:
- Check for containing
.husky/pre-commitgitleaks protect - If missing, add before any
gitleaks protect --staged --verbosecommandlint-staged - If doesn't exist, run
.husky/firstnpx husky init
提交前,请确保已配置GitLeaks:
- 检查文件中是否包含
.husky/pre-commit命令gitleaks protect - 如果缺失,在任何命令之前添加
lint-stagedgitleaks protect --staged --verbose - 如果目录不存在,先运行
.husky/npx husky init
Workflow
工作流程
- Pull latest changes from remote ()
git pull - Show current and analyse all changes
git status - Detect commitlint config to determine message format (see )
rules/message-format.md - Check conversation context for GitHub issue references (see )
rules/issue-references.md - Assess scope of changes (see )
rules/change-scope.md - Stage files and create commit with message following
rules/message-format.md
- 从远程仓库拉取最新变更()
git pull - 显示当前并分析所有变更
git status - 检测commitlint配置以确定提交信息格式(详见)
rules/message-format.md - 检查对话上下文以获取GitHub问题引用(详见)
rules/issue-references.md - 评估变更范围(详见)
rules/change-scope.md - 暂存文件并按照的规则创建提交信息并完成提交
rules/message-format.md