Loading...
Loading...
Compare original and translation side by side
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]<type>[可选 scope]: <描述>
[可选 正文]
[可选 页脚]fix(parser):-fix(parser):-| Type | Description |
|---|---|
| A new feature (user-visible) |
| A bug fix (user-visible) |
| Documentation only changes |
| Changes that do not affect the meaning of the code (formatting, semicolons, etc.) |
| A code change that neither fixes a bug nor adds a feature |
| A code change that improves performance |
| Adding missing tests or correcting existing tests |
| Changes that affect the build system or external dependencies |
| Changes to CI configuration files and scripts |
| Other changes that don't modify src or test files |
| Reverts a previous commit |
| 类型 | 描述 |
|---|---|
| 用户可见的新功能 |
| 用户可见的bug修复 |
| 仅修改文档 |
| 不影响代码含义的变更(如格式化、分号调整等) |
| 既不修复bug也不添加功能的代码变更 |
| 提升性能的代码变更 |
| 添加缺失测试或修正现有测试 |
| 影响构建系统或外部依赖的变更 |
| 修改CI配置文件和脚本 |
| 其他不修改源码或测试文件的变更 |
| 回滚之前的提交 |
digraph commit_workflow {
rankdir=TB;
node [shape=box];
check [label="Check git status"];
stage [label="Stage changes\n(if needed)"];
review [label="Review staged diff"];
analyze [label="Analyze changes\nDetermine type & scope"];
write [label="Write commit message"];
commit [label="Execute git commit"];
check -> stage;
stage -> review;
review -> analyze;
analyze -> write;
write -> commit;
}digraph commit_workflow {
rankdir=TB;
node [shape=box];
check [label="Check git status"];
stage [label="Stage changes\n(if needed)"];
review [label="Review staged diff"];
analyze [label="Analyze changes\nDetermine type & scope"];
write [label="Write commit message"];
commit [label="Execute git commit"];
check -> stage;
stage -> review;
review -> analyze;
analyze -> write;
write -> commit;
}git status --short
git diff --cached --stat # staged changes
git diff --stat # unstaged changesgit status --short
git diff --cached --stat # 已暂存的变更
git diff --stat # 未暂存的变更git diff --cachedgit diff --cachedfeat(auth): add OAuth2 login support
fix: prevent crash on empty input
refactor(api): extract validation logicupdated some stuff
fix bug
WIP
changesfix(parser): handle unicode characters in filenames
Previously, filenames with non-ASCII characters would cause
a decode error. Now using UTF-8 decoding with fallback to
latin-1 for legacy files.
Closes #123fix(parser): handle unicode characters in filenames
Previously, filenames with non-ASCII characters would cause
a decode error. Now using UTF-8 decoding with fallback to
latin-1 for legacy files.
Closes #123-Closes #123Fixes #456Co-authored-by: Name <email>Reviewed-by: Name <email>-Closes #123Fixes #456Co-authored-by: Name <email>Reviewed-by: Name <email>| Changes | Commit |
|---|---|
| New endpoint added | |
| Bug causing crash | |
| Updated README | |
| Reformatted code | |
| Renamed internal function | |
| Optimized query | |
| Added unit tests | |
| Updated dependencies | |
| Changed CI config | |
| Cleaned up files | |
| Breaking API change | |
| 变更内容 | 提交消息 |
|---|---|
| 添加新接口 | |
| 修复导致崩溃的bug | |
| 更新README | |
| 格式化代码 | |
| 重命名内部函数 | |
| 优化查询 | |
| 添加单元测试 | |
| 更新依赖 | |
| 修改CI配置 | |
| 清理文件 | |
| 破坏性API变更 | |
| Mistake | Fix |
|---|---|
| Past tense ("added") | Use imperative ("add") |
| Too vague ("fix bug") | Be specific ("fix null check in parser") |
| Too long subject | Keep concise, move details to body |
| Wrong type | |
| Combining unrelated changes | Split into multiple commits |
| Overusing scope | Only add scope when it meaningfully improves clarity |
| 错误 | 修正方式 |
|---|---|
| 使用过去式("added") | 使用祈使语气("add") |
| 描述过于模糊("fix bug") | 具体化描述("fix null check in parser") |
| 主题行过长 | 保持简洁,将细节移至正文 |
| 类型选择错误 | |
| 合并无关变更 | 拆分为多个提交 |
| 过度使用scope | 仅当能显著提升清晰度时才添加scope |
feat: New feature for users
fix: Bug fix for users
docs: Documentation only
style: Formatting, no logic change
refactor: Code change, no behavior change
perf: Performance improvement
test: Adding/fixing tests
build: Build system, dependencies
ci: CI configuration
chore: Maintenance, tooling
revert: Reverting commitsfeat: 用户可见新功能
fix: 用户可见bug修复
docs: 仅修改文档
style: 格式化调整,无逻辑变更
refactor: 代码调整,无行为变更
perf: 性能优化
test: 添加/修复测试
build: 构建系统、依赖变更
ci: CI配置变更
chore: 维护工作、工具调整
revert: 回滚提交