Skip to content

Instantly share code, notes, and snippets.

@attolee
Last active July 10, 2018 12:02
Show Gist options
  • Save attolee/5b9e4327a4698d00d219d655f914712c to your computer and use it in GitHub Desktop.
Save attolee/5b9e4327a4698d00d219d655f914712c to your computer and use it in GitHub Desktop.
delete all merged branches remotely
git branch -r --merged | egrep -v "(^\*|master|dev)" | sed s/origin\\/// | xargs -I{} git push origin --delete {}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment