Armory
Source
Browse
Hooks

prevent-direct-push-2

❌ Direct push to main/develop is not allowed! Protected branches: - main (production) - develop (integration) Git Flow workflow: 1. Create a feature branch: /feature <name> 2. Make your changes and commit 3. Push feature branch: git push origin feature/<name> 4. Create pull request: gh pr create 5. After approval, merge with: /finish For releases: /release <version> → PR → /finish For hotfixes: /hotfix <name> → PR → /finish Current branch: {current_branch} 💡 Use feature/release/hotfix branches instead of pushing directly to main/develop.

Score
Unranked
Evidence
No signals yet
Last commit
Not known
Listed

Install

armory install prevent-direct-push-2 --cli claude

writes the file to.claude/hooks/prevent-direct-push-2Listed as compatible

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

❌ Direct push to main/develop is not allowed! Protected branches: - main (production) - develop (integration) Git Flow workflow: 1. Create a feature branch: /feature 2. Make your changes and commit 3. Push feature branch: git push origin feature/ 4. Create pull request: gh pr create 5. After approval, merge with: /finish For releases: /release → PR → /finish For hotfixes: /hotfix → PR → /finish Current branch: {current_branch} 💡 Use feature/release/hotfix branches instead of pushing directly to main/develop.

When to use it

❌ Direct push to main/develop is not allowed! Protected branches: - main (production) - develop (integration) Git Flow workflow: 1. Create a feature branch: /feature 2. Make your changes and commit 3. Push feature branch: git push origin feature/ 4. Create pull request: gh pr create 5. After approval, merge with: /finish For releases: /release → PR → /finish For hotfixes: /hotfix → PR → /finish Current branch: {current_branch} 💡 Use feature/release/hotfix branches instead of pushing directly to main/develop.

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

Notes

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