Skip to content

Instantly share code, notes, and snippets.

@emyasnikov
Forked from knu/gist:111055
Last active April 2, 2024 09:52
Show Gist options
  • Save emyasnikov/5de6e73b7b06cd12b4a9c424d808acb6 to your computer and use it in GitHub Desktop.
Save emyasnikov/5de6e73b7b06cd12b4a9c424d808acb6 to your computer and use it in GitHub Desktop.
How to mass-rename tags and push them with Git
# make sure your tags are up to date
git fetch origin
# rename all tags
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git tag -d $t; done
# synchronise with the server
git push --tags --prune origin refs/tags/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment