Skip to content

Instantly share code, notes, and snippets.

@LukasRychtecky
Created December 12, 2013 18:42
Show Gist options
  • Save LukasRychtecky/7933157 to your computer and use it in GitHub Desktop.
Save LukasRychtecky/7933157 to your computer and use it in GitHub Desktop.
Removes all merged branches into next in a public repo.
git branch -a --merged remotes/origin/next | grep -v -E "master|next|release" | grep "public" | cut -d "/" -f 3 | xargs -n 1 git push --delete public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment