Skip to content

Instantly share code, notes, and snippets.

@n8gray
n8gray / git-delete-merged-branches.sh
Created June 29, 2020 22:33
Delete branches that have been merged to the branch of your choice. Works with regular merges and squash merges.
#!/bin/sh
set -eo pipefail
BASE=origin/dev
if [[ $1 == "-d" ]]; then
DELETE=1
shift
fi