Skip to content

Instantly share code, notes, and snippets.

View zasadnyy's full-sized avatar

Vitaliy Zasadnyy zasadnyy

View GitHub Profile
@bxt
bxt / git-deletebranches.sh
Last active June 23, 2021 15:01
Git Delete Merged Branches
#!/bin/bash
MAIN=${1:-development}
BRANCHES=$(git branch --merged $MAIN | grep -v -e 'master\|staging\|development\|\*')
echo Branches merged into $MAIN:
echo $BRANCHES
read -p "Delete these branches (y/n)? " answer