Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created October 17, 2019 22:46
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 rms1000watt/dffd4cbedec5bde8fdb4da797732d27b to your computer and use it in GitHub Desktop.
Save rms1000watt/dffd4cbedec5bde8fdb4da797732d27b to your computer and use it in GitHub Desktop.
Delete RC Tags in Git/Github Repos
#!/usr/bin/env bash
git fetch --tags --all
for tag in $(git tag -l); do
if ! echo "${tag}" | grep -q "\-rc"; then
continue
fi
echo
echo "Deleting TAG=${tag}"
git tag -d "${tag}"
git push -d upstream "${tag}"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment