I've created a release on github, but it seems to be a non-annotated tag. Anyone know how to make an annotated tag along with a release? Is it OK to just replace the tag with an annotated one -- will it still work?
In order to create a Git tag for the last commit of your current checked out branch, use the “git tag” command with the tag name and specify “HEAD” as the commit to create the tag from. Similarly, if you want your tag to be annotated, you can still use the “-a” and “-m” options to annotate your tag.
Annotated Tags An annotated tag creates an additional tag object in the Git repository, which allows you to store information associated with the tag itself. This may include release notes, the meta-information about the release, and optionally a signature to verify the authenticity of the commit to which it points.
Annotated Tags: To create an annotated tag in Git you can just run the following simple commands on your terminal. The -m denotes message for that particular tag.
Annotated tags are created using the -a
flag.
The difference between regular tag to annotated tag is that the annotated tag is like a commit, it contain the date, author and the message attached to it.
Once you create the tags simply push it to the github repositorygit push --tags
. Since tags are simply a pointer to a given commit you can "move" them between commit.
git tag -a <tagname>
git tag -a <tagname> <SHA-1> -f
git push origin --tags -f
The important thing is the -f
(force) flag
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