Sometimes I need to apply a hotfix to an existing github tag. Instead of creating a new tag and new release it can be done to the existing one. Here are all of the steps:
Prerequisite would be to make sure you have already committed and push all new changes to the main/master branch.
Open terminal and navigate to the local repo folder
Get list of existing tags by executing:
we need to update the latest tag ‘release-22.4.0’. It will be listed at the end of the list.
First we need to delete the tag locally
git tag -d release-22.4.0
Then we need to delete the tag remotely:
git push --delete origin release-22.4.0
After that we can re-create the tag locally (it will include the latest changes from the main/master branch):
git tag release-22.4.0
And then we need to push the tag:
git push --tags
Also, if there is a Github Release created from that on Github.com, it will be in status ‘Draft’. You need to open the repo in github.com, navigate to ‘Releases’ and publish the tag.