Skip to content

Instantly share code, notes, and snippets.

@woemar
woemar / cleanup.sh
Created July 13, 2021 19:48
Bash script to delete branches already merged into master from local and remote repository
#!/bin/bash
###
# This script will remove every branch prefixed feature/, release/ or bugfix/ from your local and the
# remote repository that has already been merged to master.
# Invoke script without params to get an overview of branches to be deleted, supply "--delete" param to
# actually delete the branches.
#
###
function show_merged_branches() {