1 2 3 4 5 6 7 8 9 10 11
#!/bin/bash set -e if [ ! -d ".git" ]; then echo "❌ Not a git repository" exit 1 fi cp hooks/pre-push .git/hooks/pre-push chmod +x .git/hooks/pre-push echo "✨ Hooks installed."