Skip to content

Instantly share code, notes, and snippets.

@andrewmriley
Created April 14, 2016 19:15
Show Gist options
  • Save andrewmriley/cfe3db03089abdfaf9c5881b7cd4adb1 to your computer and use it in GitHub Desktop.
Save andrewmriley/cfe3db03089abdfaf9c5881b7cd4adb1 to your computer and use it in GitHub Desktop.
Command line to clean up remote git branches using peco for single selection/filtering
# change out REMOTENAME with your actual remotes reference
git branch -r | grep REMOTENAME | peco | cut -d/ -f2- | xargs -n 1 git push --delete REMOTENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment