Renaming tags on GitHub
Our build system had produced a set of tags which we'd like renamed. I first tried to Edit the tag from the tags page in GitHub, but upon saving, it responded with a server error. This might be temporary and you can stop reading right now... or it might not be.
Second off, I tried to follow this advice from Stack Overflow, but that didn't work out either.
What I wound up doing was:
- Get tag names (I used the GitHub tags listing referenced above)
- Get commit id from git show tag name
- Delete old tag with git tag -d tag name
- Apply the new tag with git tag tag name commit id
- Delete old tags from origin with git push origin --delete tag name
- Upload to GitHub with git push --tags
Oh, don't forget to let your colleagues know, so they can update their local copy of the repo with
git pull --prune --tags
Comments