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:

  1. Get tag names (I used the GitHub tags listing referenced above)
  2. Get commit id from git show tag name
  3. Delete old tag with git tag -d tag name
  4. Apply the new tag with git tag tag name commit id
  5. Delete old tags from origin with git push origin --delete tag name
  6. 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

Popular posts from this blog

Auto Mapper and Record Types - will they blend?

Unit testing your Azure functions - part 2: Queues and Blobs

Testing WCF services with user credentials and binary endpoints