Skip to content

Instantly share code, notes, and snippets.

@munky69rock
Last active May 21, 2019 07:01
Show Gist options
  • Save munky69rock/aa17bee8741a16ac45f56222a0cd7ce6 to your computer and use it in GitHub Desktop.
Save munky69rock/aa17bee8741a16ac45f56222a0cd7ce6 to your computer and use it in GitHub Desktop.
Rename git tags
#!/bin/bash
tags=$(git tag)
prefix="prefix"
for tag in ${tags[@]}; do
git tag ${prefix}-${tag} ${tag}
git tag -d ${tag}
git push origin :${tag}
done
git push --tags
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment