Skip to content

Instantly share code, notes, and snippets.

@dbapl
Forked from knu/gist:111055
Last active January 19, 2018 19:01
Show Gist options
  • Save dbapl/9f0c98483cf09d61e501 to your computer and use it in GitHub Desktop.
Save dbapl/9f0c98483cf09d61e501 to your computer and use it in GitHub Desktop.
How to mass-rename tags and push them with Git
# Rename tags named 1.X.X to 1.0X.X and push the tag changes
git tag -l | grep 1. | while read t; do n="1.0${t#*.}"; echo $n; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment