一键导入
git-workflow
Git commit workflow. Load when finishing any code-change task (after verification) to commit and push, or when explicitly staging/committing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Git commit workflow. Load when finishing any code-change task (after verification) to commit and push, or when explicitly staging/committing.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | git-workflow |
| description | Git commit workflow. Load when finishing any code-change task (after verification) to commit and push, or when explicitly staging/committing. |
git add -Agit commit, read the
author from git config (local first, then global):
git config user.name; git config user.email
If both are empty, prompt the user for their name and email and set them
(prefer repo-local config: git config user.name "..." / user.email "...")
before committing. Never use placeholder identities like pi <pi@local>,
<agent> <agent@local>, etc. — those end up in git log and on the PR.git add on the touched files before retrying the commit..github/pull_request_template.md and any relevant files in .github/git diff --stagedgit diffgit status and flag unrelated modified filesgit add <file> or git add -p)git diff --staged to verifyfetch first, run git fetch and git rebase onto the tracked branch, then retrytype: description (e.g., feat: add mask function)git logIf unrelated changes exist, create multiple commits:
git add <files-for-commit-1>
git commit -m "type: description"
git add <files-for-commit-2>
git commit -m "type: description"
git reset HEAD~1 # undo last commit (keep changes)
git reset --soft HEAD~1 # undo last commit (keep staged)
git rebase --continue hangs in pi bashIf EDITOR=nvim (or any TTY-bound editor) is set in the environment,
git rebase --continue will spawn that editor to confirm the commit message
and hang indefinitely in pi's non-interactive bash tool — the tool reports
"Command aborted" after the shell timeout, and git is left in a half-finished
rebase state.
Fix: bypass the editor with core.editor=true:
git -c core.editor=true rebase --continue
Equivalent: GIT_EDITOR=true git rebase --continue.
Apply this whenever --continue / --abort / --skip appear to hang. The same
applies to other git operations that spawn an editor (interactive rebase,
git commit without -m, git tag -a, etc.).
For cross-fork PRs (isCrossRepository: true), git push origin <branch> does
NOT update the PR — it only creates a new branch on the base repo. To update the
PR, push to the contributor's fork:
gh pr view <N> --repo <org>/<repo> --json maintainerCanModify
# if maintainerCanModify: true:
git push git@github.com:<contributor>/<repo>.git <local>:<pr-branch>
In a git merge, --ours = current branch, --theirs = branch being merged in
(opposite of git checkout's --ours/--theirs semantics in rebase).
Use when opening a PR and driving it to green CI — push the branch, write a high-level PR description, watch checks, fix failures, and keep looping until green; also use when an already-open PR gets new commits.
Use when the user starts, resumes, switches, saves, or recalls a named task or ongoing work across sessions (e.g. "remember this", "continue X", "what was I doing on Y", "track this task").
Use when modifying or adding a transform, loss, model, method, package, task-model, config, docs page, or example in a Lightly AG repo (lightly-ssl or lightly-train) and you need repo-specific conventions.
Spawn a subagent to run a task. Use when you want to delegate work to a separate pi instance.
Use when configuring or replicating LT-DETR v2 (ltdetrv2-s/m/l/x) COCO benchmarks via the lightly-train wrapper — model alias map, global vs per-rank batch size, recipe invariants, ECDet config mapping, cluster pins, and common gotchas.
Use when the user starts, resumes, switches, saves, or recalls a named task or ongoing work across sessions (e.g. "remember this", "continue X", "what was I doing on Y", "track this task").