til

Today I Learned: collection of notes, tips and tricks and stuff I learn from day to day working with computers and technology as an open source contributor and product manager

View project on GitHub

How to rename a tag

First you need to make an alias of the old tag

git tag new_tag_name old_tag_name

Then you need to delete the old tag locally:

git tag --delete old_tag_name

Or short form:

git tag -d old_tag_name

Then delete the tag on you remote location - do note there might be several

# Check your remote sources:
git remote -v
# The argument (3rd) is your remote location,
# the one you can see with `git remote`. In this example: `origin`
git push origin :refs/tags/old_tag_name

And finally you need to add your new and shiny tag to the remote location.

git push origin --tags

Repeat this for every remote location.

References