-
And cleanup:
#!/bin/bash set -euo pipefail IFS=$'\n\t' PREFIX="ci-check-" git for-each-ref --format='%(refname:short)' "refs/heads/${PREFIX}*" | while IFS= read -r branch_name; do git branch -D "$branch_name" done git for-each-ref --format='%(refname:short)' "refs/remotes/origin/${PREFIX}*" | sed "s|^origin/||" | while IFS= read -r branch_name; do git push origin --delete "$branch_name" done
Please register or sign in to comment