Files
kiskaadee e5600c05ad feat(auto-push): add local git hooks for pre-commit validation and
autopush

- Add pre-commit hook to enforce structural validation before commit
- Add post-commit hook for resilient Gitea auto-push and offline
  tolerance
- Add scripts/install-hooks.sh to configure core.hooksPath
2026-09-09 17:15:45 -05:00

14 lines
406 B
Bash

#!/usr/bin/env bash
set -e
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${REPO_ROOT}"
chmod +x .githooks/pre-commit .githooks/post-commit
git config core.hooksPath .githooks
echo "✅ Git hooks configured successfully:"
echo " • core.hooksPath set to .githooks"
echo " • pre-commit: structural validation via validate-brain.py"
echo " • post-commit: auto-push to origin"