Force Push Blocker
Hooks security 147
Block git force push commands using the if condition for efficient filtering. Prevents accidental force pushes that can overwrite remote history. Covers --force, --force-with-lease, and the -f shorthand.
npx claude-code-templates@latest --hook security/force-push-blocker claude-code — force-push-blocker
Content
JSON
{
"description": "Block git force push commands using the if condition for efficient filtering. Pr..."
"hooks": {
"PreToolUse": [1 item]
}
}