Skip to content

Instantly share code, notes, and snippets.

@therebelrobot
Created April 17, 2016 15:21
Show Gist options
  • Save therebelrobot/baee8f9eb767da3479bd66580354ac5a to your computer and use it in GitHub Desktop.
Save therebelrobot/baee8f9eb767da3479bd66580354ac5a to your computer and use it in GitHub Desktop.
Remove stale or merged git branches
git remote prune origin
git branch -r --merged master | egrep -iv '(master|develop)' | sed 's/origin\///g' | xargs -n 1 git push --delete origin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment