Skip to content

Instantly share code, notes, and snippets.

View manofearth's full-sized avatar

Aleksey Zemlyanskiy manofearth

View GitHub Profile
@manofearth
manofearth / delete-stale-branches.sh
Last active November 14, 2021 02:34
Delete Stale Branches
#!/usr/bin/env bash
while getopts "d" opt; do
case $opt in
d) dryRunOpt="--dry-run";;
esac
done
# prune local "cache" of remote branches first:
git fetch --prune origin
# delete merged to master branches: