I have a tag called latest and I want that to be a branch instead. Opposite of this. I need to remove it from the remote repo as well.
Background: This is currently a problem for many golang packages, where goinstall looks for a release tag or branch, which corresponds with the latest official release of the language. Many people mistakenly used git tags, by analogy with other VCSes, when they should have used git branches.
git checkout latest
git tag -d latest # delete tag locally
git push origin :refs/tags/latest # delete tag in repo
git checkout -b latest
git push origin latest
The danger of removing a tag is described here, but that is why a branch should have been used in the first place.
Instead of deleting the tag use a branch of a different name. Use different naming conventions for your branches and your tags. This will better allow you to fullfil the spirit of
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With