Skip to content

Latest commit

 

History

History
45 lines (31 loc) · 878 Bytes

rename_a_tag.md

File metadata and controls

45 lines (31 loc) · 878 Bytes

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