git-prune-merged

main
Alpha Chen 6 months ago
parent 27c7f9c80c
commit 31f024f5b8
No known key found for this signature in database

@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -euo pipefail
if [[ "${TRACE-0}" == "1" ]]; then
set -o xtrace
fi
# cd "$(dirname "$0")"
main() {
# https://stackoverflow.com/a/6127884
git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d
}
main "$@"
# vim: ft=sh
Loading…
Cancel
Save