Skip to content

Instantly share code, notes, and snippets.

@maapteh
Created May 31, 2017 14:43
Show Gist options
  • Save maapteh/0a74cb9ed7004ac013f7a192cfd6f2e0 to your computer and use it in GitHub Desktop.
Save maapteh/0a74cb9ed7004ac013f7a192cfd6f2e0 to your computer and use it in GitHub Desktop.
remove 'v' from tags
#!/bin/bash
for tag in $(git tag)
do
git tag "${tag/v/}" $tag
done
for tag in $(git tag)
do
if [[ $tag = *v* ]]
then
git tag -d $tag
fi
done
for tag in $(git tag)
do
git push origin :refs/tags/v$tag
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment