7 lines
212 B
Bash
Executable File
7 lines
212 B
Bash
Executable File
#!/usr/bin/env bash
|
|
git branch --merged "$([[ "${1}" != "-f" ]] && git rev-parse HEAD)" |
|
|
grep -Ev '(^\*|^\s*(main|master|develop)$)' |
|
|
while read -r branch_name; do
|
|
git branch -d "${branch_name}"
|
|
done
|