Setup Git Guardrails
Sets up a PreToolUse hook that intercepts and blocks dangerous git commands before Claude executes them — without getting in the way of normal target-branch workflows.
Always blocked, everywhere:
git reset --hardgit clean -f/git clean -fdgit checkout ./git restore .git push --force/git push -f
Context-aware:
git push— if at least one worktree exists, pushing from the main checkout is blocked (agents are kept in their worktre
[Description truncada. Veja o README completo no GitHub.]