force-push-blocker
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.
- Score
- Unranked
- Evidence
- No signals yet
- Last commit
- Not known
- Listed
Install
armory install force-push-blocker --cli claudewrites the file to.claude/hooks/force-push-blockerListed as compatible
# fetches the hook script into:
.claude/hooks/force-push-blocker
# then register it in your settings.json "hooks" block.↳ Add the hook entry to settings.json, then restart the harness.
Needs the armory CLI · not on npm yet, build it from cli/ in the repository
What it is
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.
When to use it
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.
How to install / invoke
# Wire this hook script into .claude/settings.json
curl -sL https://raw.githubusercontent.com/davila7/claude-code-templates/main/cli-tool/components/hooks/security/force-push-blocker.json -o .claude/hooks/force-push-blocker.json
Notes
Extracted from davila7/claude-code-templates, security category.