Skip to content

Instantly share code, notes, and snippets.

@nwoolls
nwoolls / git_delete_merged.sh
Last active October 14, 2020 20:55
Script that interactively cleans up remote Git branches already merged into master
#!/usr/bin/env bash
# This script will show you all of the branches in the current Git repo that are already
# merged into $dest_branch.
#
# Afterward you will be prompted with whether you want to proceed with deleting those remote
# branches (automatically).
#
# Finally you will be prompted with whether you want to prune local branches.
#