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
14 lines
406 B
Bash
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"
|