#!/usr/bin/env bash # Enable in-repo hooks for this clone only (does not touch global git config). set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$ROOT" git config core.hooksPath .githooks chmod +x .githooks/pre-push scripts/sync-master-spec-reminder.sh scripts/setup-githooks.sh 2>/dev/null || true echo "Set local core.hooksPath=.githooks for $(basename "$ROOT")" echo "Pre-push will remind you to refresh docs/GISHEN-MASTER-SPEC.md" echo "Unset with: git config --unset core.hooksPath" echo "Strict block: GISHEN_MASTER_SPEC_STRICT=1 git push"