Skip to content

Instantly share code, notes, and snippets.

@ssoper
Last active December 27, 2017 21:20
Show Gist options
  • Save ssoper/8f4b8231e4138d21e9ec73915dcd07ea to your computer and use it in GitHub Desktop.
Save ssoper/8f4b8231e4138d21e9ec73915dcd07ea to your computer and use it in GitHub Desktop.
Remove merged git branches
#!/usr/bin/env bash
git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -D
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment