Skip to content

Instantly share code, notes, and snippets.

@lewkoo
Last active July 6, 2020 13:05
Show Gist options
  • Save lewkoo/b8d5bf24509f64705d3ae21ddcbc1279 to your computer and use it in GitHub Desktop.
Save lewkoo/b8d5bf24509f64705d3ae21ddcbc1279 to your computer and use it in GitHub Desktop.
Removes all tags on a remote.
#!/bin/bash
tag_names=""
git ls-remote --tags --refs ci |
{
while read old_t; do
tag_names+=":refs/tags/${old_t##*refs/tags/} "
done
git push origin $tag_names
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment