Skip to content

Instantly share code, notes, and snippets.

@jorgemsrs
Created April 30, 2020 08:14
Show Gist options
  • Save jorgemsrs/445abaf64e675bf82f8d7b32af4b6c60 to your computer and use it in GitHub Desktop.
Save jorgemsrs/445abaf64e675bf82f8d7b32af4b6c60 to your computer and use it in GitHub Desktop.
Mass rename tags and push them with Git
# variation of https://gist.github.com/knu/111055
# Rename tags named #.#.# or v#.#.# to v#.#.# and push the tag changes
git tag -l | while read t; do n="v${t#v}"; echo "$t - $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