git-techniques
Installation
SKILL.md
Git Techniques
Use for advanced Git investigation, recovery, and debugging: reflog recovery, history search, line history, blame follow-up, bisect, fixup/autosquash, worktrees, stash inspection, and large-repo checkout options. Routine commits, pushes, branches, and PRs follow the bundled git safety skill and the repository's AGENTS.md; repository worktree, branch, and merge rules win over anything below.
Safety contract
- Default to read-only commands:
status,log,show,diff,blame,reflog,log -S,log -G,log -L, andworktree list. - Do not run a mutating operation unless the user explicitly requested that exact operation. This includes
reset,rebase,commit --amend,pushin any force form,worktree add/remove, sparse-checkout or clone-filter changes, broad stash operations, global/system config changes,maintenance, and blame-ignore-revs changes. - Do not run interactive commands such as
add -p,checkout -p,stash -p, orrebase -iin automation unless the user explicitly asks and provides an interactive context. Prefer named paths and explicit non-interactive commands. - Preserve unrelated working-tree changes. Name the files being staged, inspected, or recovered. Never commit or push changes the session did not make or cannot explain.
- Before an explicitly authorized discard, use the bundled
gitrecovery-save path where applicable. - Never rewrite pushed or shared history by default. If a remote rewrite is explicitly authorized and repository policy permits it, prefer
--force-with-leaseover--force.