From 0323c2919b28bfc80ac13df6f41db00a31d0a78b Mon Sep 17 00:00:00 2001 From: Defame1297 Date: Wed, 16 Sep 2026 15:27:30 +0000 Subject: [PATCH] docs(git): restore the general bare-git rule in git-commits The exception pointed at a Gotcha that does not exist. State the rule (machine-parsed output or an interactive editor runs bare git, with the reason inline) and point at rewrite-history.md for interactive rebase. Co-Authored-By: Claude Opus 5 (1M context) --- plugins/git/.apm/skills/git-commits/SKILL.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/.apm/skills/git-commits/SKILL.md b/plugins/git/.apm/skills/git-commits/SKILL.md index 145bb79..17b1ed0 100644 --- a/plugins/git/.apm/skills/git-commits/SKILL.md +++ b/plugins/git/.apm/skills/git-commits/SKILL.md @@ -21,7 +21,7 @@ allowed-tools: Bash ## Gotchas -- **Run git as `rtk git `, never bare `git`** — org convention, in `&&` chains too, except where a skill's Gotchas name a specific bare-git case (interactive rebase here). +- **Run git as `rtk git `, never bare `git`** — org convention, in `&&` chains too. Run it bare only when rtk would break it: output a script parses, or a command that opens an interactive editor (`rebase -i` in `references/rewrite-history.md`). Say why inline. - **Refuse to force-push `main`/`master`.** A rewrite diverges the branch and the reflex is to force it back — safe only where nobody else has based work on it. - **`reset --hard` is a confirmation gate, not a default.** It overwrites the working tree, and uncommitted edits it discards were never in git, so no reflog recovers them. Name what will be lost and offer a stash first. - **Never add `--no-verify`** — using it when a hook fails bypasses the QA gate the pipeline depends on. Only on the user's explicit demand, with a warning.