Acidentally deleted tag

I accidentally deleted the tag for the latest release on my project.
I simply did: git push origin :0.9.3
The release then became “draft”, so I republished it, and it got a new tag with the latest commit and the current date.
So everything is there, but I just need to get the tag back to the original commit with the original date.
I haven’t done git fetch, so I assume I still have the original tag locally, can I simply do: git push origin 0.9.3?

1 Like

I managed to get the tag back to the original commit, but not the release date.
git push -f origin 0.9.3

Unfortunately when you recreate releases the date stay as the new creation date. This is a known problem which can also affect chronological order — e.g. if you have to create some older releases that you omitted, these will end up showing on top, regardless of the asciibetical order of the tags (e.g. SemVer).

Various people have asked to add a feature that allows to manually modify the release date, so we’ll see. My guess is that currently it’s all automated and relying on the commit info to which the tags are associated, so it might not be a feature we’ll be seeing any soon, but let’s hope GH can find a workaround for this.