jb-committer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Committer Skill

Committer 技能

Author: bjesuiter
作者:bjesuiter

When to use (keywords: commit, commit-current, commit-only)

使用时机(关键词:commit、commit-current、commit-only)

Use this skill when the user asks to create commits or commit the current change set.
当用户要求创建提交或提交当前变更集时,使用此技能。

Commit related changes (keyword: commit)

提交相关变更(关键词:commit)

Read all uncommitted changes in the git working directory: unstaged, staged, and untracked.
Group them by logical change, for example:
  • Renaming a function/variable/class across multiple files
  • Adding a new feature: component + route + tests + types all belong together
  • Moving/refactoring code from one file to another (delete in A, add in B)
  • Updating imports after relocating a file
  • Adding a dependency to package.json and its usages in source files
  • Bug fix that touches multiple related files
  • Configuration changes that belong together (e.g., tsconfig.json + package.json for a new compiler option)
  • Type definition changes and the code that uses those types
  • A new test file alongside the implementation it tests
  • Documentation updates that describe the same feature across multiple docs
  • Deleting dead code across multiple files
  • Updating API endpoints: handler + route registration + client calls + tests
Commit all related changes together. Make multiple commits if needed. Choose a clear message that describes the semantic meaning of the change. After finishing the commit(s), always push to the remote.
When using "beans" for ticketing and issue tracking
  • A change in the beans file should be committed together with the change that is related to the ticket.
  • Before committing: a ticket related to the current change should be changed to status "done" if the ticket is finished; otherwise the ticket status change needs to be committed in a second commit.
读取Git工作目录中所有未提交的变更:包括未暂存、已暂存和未跟踪的文件。
按逻辑变更对它们进行分组,例如:
  • 在多个文件中重命名函数/变量/类
  • 添加新功能:组件 + 路由 + 测试 + 类型定义应归为一组
  • 将代码从一个文件移动/重构到另一个文件(在A中删除,在B中添加)
  • 移动文件后更新导入语句
  • 向package.json添加依赖及其在源文件中的使用
  • 涉及多个相关文件的Bug修复
  • 相关的配置变更(例如,为新编译器选项修改tsconfig.json + package.json)
  • 类型定义变更以及使用这些类型的代码
  • 与实现代码对应的新测试文件
  • 跨多个文档更新同一功能的说明
  • 删除多个文件中的无用代码
  • 更新API端点:处理器 + 路由注册 + 客户端调用 + 测试
将所有相关变更一起提交。 如有需要,创建多个提交。 选择清晰的提交信息,描述变更的语义。 完成提交后,务必推送到远程仓库。
当使用"beans"进行工单和问题跟踪时
  • beans文件中的变更应与该工单相关的变更一起提交。
  • 提交前:如果当前变更相关的工单已完成,应将其状态改为"done";否则,工单状态变更需要在第二个提交中完成。

Commit only one change (keyword: commit-current or commit-only)

仅提交单个变更(关键词:commit-current 或 commit-only)

Sometimes the user wants to only commit files related to a single change. If the user asks for "commit-current" or "commit-only", find all files related to the current change in the chat session and only commit those files as described above. Do not write or commit unrelated change files. After creating the commit, always push to the remote.
有时用户只想提交与单个变更相关的文件。 如果用户要求"commit-current"或"commit-only",请在对话会话中找到与当前变更相关的所有文件,并仅按上述方式提交这些文件。请勿编写或提交无关的变更文件。 创建提交后,务必推送到远程仓库。

Example

示例

Input: "commit-current" Output: Stage only files related to the current change and create a single commit with a concise message.
输入:"commit-current" 输出:仅暂存与当前变更相关的文件,并创建一条简洁信息的单个提交。