8 lines
279 B
Bash
Executable File
8 lines
279 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Removes all branches from origin starting with updated-inputs-* except the 8 newest ones
|
|
|
|
git fetch origin --prune
|
|
|
|
git branch -r | sed "s/^ *//g" | grep "^origin/updated-inputs-" | sort | head -n -8 | sed "s/^origin\///g" | xargs git push origin --delete
|