Files
kraken-stoploss/pre-commit
Gage-Goodson 13acf3130c first commit
2025-07-30 20:58:34 -05:00

12 lines
263 B
Bash

#!/bin/bash
current_branch="$(git branch --show-current)"
for protected_branch in "main" "stable"; do
if [[ "$protected_branch" == "$current_branch" ]]; then
echo "ERROR: local branch $current_branch is protected"
exit 1
fi
done
exit 0