Skip to content

Instantly share code, notes, and snippets.

@checco
Created November 7, 2019 10:12
Show Gist options
  • Save checco/9d14165b2baafec0152f1759ecd56613 to your computer and use it in GitHub Desktop.
Save checco/9d14165b2baafec0152f1759ecd56613 to your computer and use it in GitHub Desktop.
Remove all merged GIT branches
#!/bin/bash
git for-each-ref --format '%(refname:short)' refs/heads | grep -v master | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment