Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save feel5ny/0727f34062c1c23b174f5d5772ff3725 to your computer and use it in GitHub Desktop.
Save feel5ny/0727f34062c1c23b174f5d5772ff3725 to your computer and use it in GitHub Desktop.
Rename all tags in git matching a pattern
# Rename all of the old tags in the repo that started with EUSS_Prechat_v* to just the numeric part so that they're sorted correctly
git tag -l | grep EUSS | while read t; do n="${t/EUSS_Prechat_v/}"; git tag $n $t ; 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