Added hook to prevent pushing to staging and master

This commit is contained in:
2025-02-17 00:24:14 +11:00
parent 675138fcc5
commit 049698100f
2 changed files with 25 additions and 0 deletions

14
setup-hooks.sh Normal file
View File

@@ -0,0 +1,14 @@
#!/bin/sh
HOOKS_DIR=".githooks"
GIT_HOOKS_DIR=".git/hooks"
mkdir -p "$GIT_HOOKS_DIR"
for hook in "$HOOKS_DIR"/*; do
hook_name=$(basename "$hook")
cp "$hook" "$GIT_HOOKS_DIR/$hook_name"
chmod +x "$GIT_HOOKS_DIR/$hook_name"
done
echo "Git hooks installed!"