Skip to content

Instantly share code, notes, and snippets.

@nwoolls
nwoolls / git_delete_merged.sh
Last active Oct 14, 2020
Script that interactively cleans up remote Git branches already merged into master
View git_delete_merged.sh
#!/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.
#
You can’t perform that action at this time.