commit-all
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCommit All
全部提交
Collect every change on the current branch into one commit with a generated message.
No push, no , no new branches, no history rewriting: the skill produces exactly
one commit on the branch the user is already on, or stops to ask.
--amendOnly the user triggers this skill: never activate it from a description of finished
work, and never invoke it from another skill. When the user supplies their own commit
message, commit directly without this skill.
Arguments: commits; prints the file list and the
generated message without committing.
/commit-all/commit-all dry-run将当前branch上的所有变更合并为一个带有自动生成commit message的commit。
不执行push,不使用,不创建新branch,不重写提交历史:该skill只会在用户当前所在的branch上生成一个commit,否则会停止并询问用户。
--amend仅由用户触发该skill:切勿根据已完成工作的描述自动激活它,也切勿从其他skill中调用它。当用户提供自定义commit message时,直接执行提交,无需使用该skill。
参数: 执行提交; 打印文件列表和自动生成的message,但不执行提交。
/commit-all/commit-all dry-runWorkflow
工作流程
- Survey the tree. Run ,
git status --short,git diff, andgit diff --stagedfor the branch's message conventions. A clean tree ends the run with "no changes to commit" and nothing else.git log --oneline -10 - Check the branch. On or
main, stop and ask whether to commit there or create a branch first; never commit to a default branch silently.master - Separate the session's changes from pre-existing ones. Compare the tree against
the from the start of the conversation. Without that snapshot, ask whether to commit everything. By default
git statusmeans all changes on the branch; when part of the tree is clearly another topic, say so in one sentence and let the user decide.commit-all - Screen untracked files. Skip anything should have covered, one-off scripts, and files that may hold secrets; ask about them instead of staging blindly.
.gitignore - Generate the message. One imperative summary line up to ~72 characters. Reuse a
prefix convention (,
feat(scope):) only whenfix:shows one; never impose your own. Add a body only when the diff spans several unrelated groups: 2-4 short bullets, one per group, no per-file listing. Write the message in English. No co-author or agent attribution unless the repository's conventions require it.git log - Show before committing. When the tree holds changes the session did not make,
print the file list and the generated message and wait for confirmation. In
mode, stop here always.
dry-run - Commit. One commit on the current branch. Afterwards show (or a short excerpt). Do not push.
git log -1 --stat
- 检查工作区。运行、
git status --short、git diff以及git diff --staged,以遵循分支的message约定。若工作区干净,则输出“no changes to commit”并结束流程。git log --oneline -10 - 检查分支。若当前是或
main分支,停止操作并询问用户是直接提交还是先创建分支;切勿静默提交到默认分支。master - 区分会话期间的变更与已有变更。将当前工作区状态与会话开始时的快照进行对比。若没有该快照,则询问用户是否提交所有变更。默认情况下,
git status指提交分支上的所有变更;若工作区中存在明显属于其他主题的变更,用一句话说明并让用户决定。commit-all - 筛选未跟踪文件。跳过应忽略的文件、一次性脚本以及可能包含敏感信息的文件;针对这些文件询问用户,而非盲目暂存。
.gitignore - 生成提交信息。生成一条不超过约72个字符的命令式摘要行。仅当显示存在前缀约定(如
git log、feat(scope):)时,才复用该约定;切勿自行强加约定。仅当diff包含多个不相关的变更组时,才添加正文:2-4条简短项目符号,每个变更组对应一条,不列出单个文件。提交信息使用英文书写。除非仓库约定要求,否则不添加协作者或agent署名。fix: - 提交前确认。若工作区包含非本次会话产生的变更,打印文件列表和自动生成的message并等待用户确认。在模式下,始终在此步骤停止。
dry-run - 执行提交。在当前branch上创建一个commit。完成后显示(或其简短摘录)。不执行push。
git log -1 --stat
Mechanics
操作细节
- Pass the message via with a heredoc, never
git commit -F -with escaping.-m - Argument order matters: ; putting
git commit -F - -- <paths>after the pathspec breaks.-F - zsh does not word-split an unquoted variable, so silently matches nothing; keep path lists in a file or a shell array.
git diff -- $PATHS - For a partial commit use so already-staged index entries (renames in particular) survive untouched.
git commit -F - -- <paths> - Never pass ; a failing pre-commit hook is a result to report, not an obstacle.
--no-verify - Force push and history rewriting are out of scope for this skill under any wording.
- 通过结合 heredoc 传递message,切勿使用
git commit -F -参数(避免转义问题)。-m - 参数顺序至关重要:;若将
git commit -F - -- <paths>放在路径规范之后会导致命令失效。-F - zsh不会对未加引号的变量进行分词,因此会静默匹配不到任何内容;请将路径列表存储在文件或shell数组中。
git diff -- $PATHS - 若要执行部分提交,使用,这样已暂存的索引条目(尤其是重命名操作)会保持不变。
git commit -F - -- <paths> - 切勿传递参数;若预提交钩子(pre-commit hook)执行失败,需向用户报告该结果,而非绕过它。
--no-verify - 无论何种情况,force push和提交历史重写都不属于该skill的处理范围。
Amend
修订提交(Amend)
When the previous commit was made by this same session and is not pushed, offer
in one sentence; run it only after the user agrees. Never offer it for a
pushed or foreign commit.
--amend若上一个commit是由本次会话生成且尚未推送,用一句话向用户提议使用;仅在用户同意后执行该操作。切勿对已推送或非本次会话生成的commit提议使用。
--amend--amend