Files
overub/scripts/setup-branches.sh
2025-12-21 17:12:32 +01:00

20 lines
440 B
Bash
Executable File

#!/bin/bash
REPO=$1
if [ -z "$REPO" ]; then
echo "Usage: ./setup-branches.sh <repo-name>"
exit 1
fi
cd "$REPO" || exit
for branch in main beta dev lts; do
git checkout -b "$branch" 2>/dev/null || git checkout "$branch"
git push -u origin "$branch"
done
tea repos protect-branch main --enable-push --require-signed-commits
tea repos protect-branch lts --enable-push --require-signed-commits
echo "Branches configured for $REPO"