Skip to content

Instantly share code, notes, and snippets.

@darkaico
Last active March 24, 2017 13:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darkaico/0d1f149f795f92995ac8af59890eb228 to your computer and use it in GitHub Desktop.
Save darkaico/0d1f149f795f92995ac8af59890eb228 to your computer and use it in GitHub Desktop.
Delete all Tags
# Delete all tags remotely
git tag -l | xargs -n 1 git push --delete origin
# Delete all tags locally
git tag | xargs git tag -d
# Delete all merged branches
git fetch --prune; git branch -r --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | awk '{sub(/origin\//,"");print}' | xargs git push origin --delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment