Skip to content

Instantly share code, notes, and snippets.

View conquests's full-sized avatar

Gyeonghwan conquests

View GitHub Profile
@conquests
conquests / git-rm-merged
Created July 12, 2022 12:17 — forked from ryanc414/git-rm-merged
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"