Armory
Source
Browse
Hooks

prevent-direct-push

Prevent direct pushes to protected branches (main, develop). Blocks git push commands targeting main or develop branches to enforce Git Flow workflow. Requires using feature/release/hotfix branches and pull requests instead of direct commits to protected branches.

Score
Unranked
Evidence
No signals yet
Last commit
Not known
Listed

Install

armory install prevent-direct-push --cli claude

writes the file to.claude/hooks/prevent-direct-pushListed as compatible

Configuration
# fetches the hook script into:
.claude/hooks/prevent-direct-push
# 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

Prevent direct pushes to protected branches (main, develop). Blocks git push commands targeting main or develop branches to enforce Git Flow workflow. Requires using feature/release/hotfix branches and pull requests instead of direct commits to protected branches.

When to use it

Prevent direct pushes to protected branches (main, develop). Blocks git push commands targeting main or develop branches to enforce Git Flow workflow. Requires using feature/release/hotfix branches and pull requests instead of direct commits to protected branches.

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/git/prevent-direct-push.json -o .claude/hooks/prevent-direct-push.json

Notes

Extracted from davila7/claude-code-templates, git category.