Skip to content

Instantly share code, notes, and snippets.

@davidfergo
Last active January 16, 2020 16:05
Show Gist options
  • Save davidfergo/b157efba34c05bd83b5e to your computer and use it in GitHub Desktop.
Save davidfergo/b157efba34c05bd83b5e to your computer and use it in GitHub Desktop.
Bulk rename tags in git
# Rename tags named myapp-#.#.# to #.#.# and push the tag changes
git tag -l |grep ^myapp- | while read t; do n="${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