Loading...
Loading...
Compare original and translation side by side
type(scope): description
[optional body]
[optional footer(s)]type(scope): description
[可选正文]
[可选页脚]undefinedundefinedundefinedundefinedFixes #123Closes #456Resolves #789Refs #NFixesRefsFixes #123Closes #456Resolves #789Refs #NFixesRefsundefinedundefined
The script outputs: branch info, staged/unstaged status, diff stats, detected scopes, recent commit style, pre-commit config status, and optionally open issues. Use this output to compose the commit message. See [scripts/commit-context.sh](scripts/commit-context.sh) for details.
该脚本会输出:分支信息、已暂存/未暂存状态、差异统计、检测到的作用域、最近提交风格、提交前配置状态,以及可选的开放问题。使用此输出来编写提交信息。详情请参阅[scripts/commit-context.sh](scripts/commit-context.sh)。undefinedundefinedundefinedundefinedgit commit -m "$(cat <<'EOF'
feat(auth): add OAuth2 support
Implements token refresh and secure storage.
Fixes #123
EOF
)"git commit -m "$(cat <<'EOF'
feat(auth): add OAuth2 support
Implements token refresh and secure storage.
Fixes #123
EOF
)"undefinedundefined
Focus on facts: **What changed**, **Why it changed** (if non-obvious), and **Impact** (breaking changes).
聚焦于事实:**变更内容**、**变更原因**(如非显而易见),以及**影响**(如破坏性变更)。| Scenario | Pattern | Example |
|---|---|---|
| Bug fix resolving issue | | |
| Feature completing issue | | |
| Related but not completing | | |
| Cross-repository | | |
| Multiple issues | Repeat keyword | |
| 场景 | 模式 | 示例 |
|---|---|---|
| 修复Bug并解决问题 | | |
| 完成功能并关闭问题 | | |
| 关联但未完成问题 | | |
| 跨仓库关联 | | |
| 多个问题 | 重复关键字 | |
undefinedundefinedundefinedundefined| Context | Command |
|---|---|
| Pre-commit context | |
| Context + issues | |
| Quick status | |
| Staged diff stats | |
| Recent commit style | |
| Open issues for linking | |
| 上下文 | 命令 |
|---|---|
| 提交前上下文 | |
| 上下文+问题 | |
| 快速状态查看 | |
| 已暂存差异统计 | |
| 最近提交风格 | |
| 可关联的开放问题 | |