hexabot/.husky/pre-push
2024-09-10 10:50:11 +01:00

9 lines
211 B
Plaintext
Executable File

BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
RESTRICTED_BRANCHES="^(main)$"
if echo "$BRANCH_NAME" | grep -Eq "$RESTRICTED_BRANCHES"; then
echo "Cannot push directly to branch: '${BRANCH_NAME}'"
exit 1
fi