Skip to content

Instantly share code, notes, and snippets.

View bmf-bracer's full-sized avatar

Blake Farrugia bmf-bracer

  • Radian Simulations LLC
  • Detroit, MI
  • X @kavidevs
View GitHub Profile
@ryanc414
ryanc414 / git-rm-merged
Last active July 12, 2022 12:17
Delete merged git branches locally and on remote
#!/bin/bash
# Remove merged git branches locally and on remote(s)
set -e
# Script constants
BRANCH_WHITELIST="(\*|master|other-special-branches)"
REMOTES="origin" # Add more remotes here as space-separated list
echo "Deleting merged branches locally"