git tag -a <version_number> -m <message>
This command allows you to create an annotated tag in git, specifying a
To create an annotated tag, use the git tag -a
command followed by the -m
flag to specify the git tag -a v1.0 -m 'First release'
.
You can also provide additional information such as the tagger's name and email using the --annotate
(or -a
for short) flag followed by the -s
flag for signing the tag with a GPG key. For example, git tag --annotate -s v1.0 -m 'First release'
.
Additionally, you can use the -F <file>
flag to specify a file containing the tag message instead of providing it directly on the command line.