Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@joecampo
Forked from knu/gist:111055
Created June 24, 2022 00:25
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 joecampo/a94bac3cd40ae131d6f037ea208ac612 to your computer and use it in GitHub Desktop.
Save joecampo/a94bac3cd40ae131d6f037ea208ac612 to your computer and use it in GitHub Desktop.
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="v${t##*-}"; 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