Skip to content

Instantly share code, notes, and snippets.

@anthonydahanne
Created December 22, 2023 00:24
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 anthonydahanne/69c2f5a64155ef4eca43f55a9a0b06c3 to your computer and use it in GitHub Desktop.
Save anthonydahanne/69c2f5a64155ef4eca43f55a9a0b06c3 to your computer and use it in GitHub Desktop.
Bash script to rename tags locally and remotely; with an exception
#!/bin/bash
for n in $(git tag)
do
if [ $n != "v6.0.4" ]; then
git tag ${n/v} $n
git tag -d $n
git push origin ${n/v} :$n
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment