lucas-viewup
11/30/2017 - 1:09 PM

How to mass-rename tags and push them with Git

How to mass-rename tags and push them with Git

# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done