Reputation: 42329
In this question How do you rename a Git tag? instructions are given to rename an old tag.
I'd like to know it these steps will keep the original date in the edited tag in place.
For example, in my git
repo the git tag
command shows:
v0.1
v1.0.0-beta
and Github shows:
I want to update the old v0.1
tag to a more descriptive v1.0.0-alpha
(which also follows the Semantic Versioning guidelines) but I'd also like to keep the original date (4 Dec 2013) in place.
Is this possible using the commands given in the answer to the question mentioned above? These would be the commands in my case as I understand:
git tag v1.0.0-alpha v0.1
git tag -d v0.1
git push origin :refs/tags/v0.1
git push --tags
Upvotes: 8
Views: 5439
Reputation: 19263
In our repository I noticed that one of our older releases had an incorrect version tag. The name was v.1.28.0
instead of v1.28.0
. I wanted to correct the issue without somehow messing up the GitHub release.
These are the steps I did to correct it:
git checkout v.1.28.0
git checkout -b release/v1.28.0
git push -u origin release/v1.28.0
git checkout develop
git branch -d release/v1.28.0
git tag -d v.1.28.0
Upvotes: 0