Skip to content

Instantly share code, notes, and snippets.

@FlorianWendelborn
Last active October 9, 2018 23:18
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 FlorianWendelborn/5931e4cfaf9997f17f923adc1e7b331a to your computer and use it in GitHub Desktop.
Save FlorianWendelborn/5931e4cfaf9997f17f923adc1e7b331a to your computer and use it in GitHub Desktop.
Adds a prefix/suffix to all existing git tags.
#!/usr/bin/env bash
PREFIX="versions/my-app/"
SUFFIX=""
git tag -l | while read t; do
NEW_NAME="${PREFIX}${t}${SUFFIX}"
git tag $NEW_NAME $t
git tag -d $t
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment