git-mktag
Create a tag object
SYNOPSIS
git mktag <
Note: The tag object content is provided via standard input.
DESCRIPTION
git-mktag is a low-level "plumbing" command in Git, not typically used directly by end-users. Its primary function is to create a tag object from a provided textual representation of its content. It reads this canonical tag object content from standard input and then writes the resulting tag object's SHA-1 hash (object ID) to standard output.
This command is an internal helper used by higher-level "porcelain" commands like git tag to materialize tag objects within the Git repository's object database. It ensures the content is valid and then stores the tag object, which links a tag name to a specific commit or other Git object, along with metadata like the tagger's information and a tag message. It serves as the fundamental mechanism for creating durable tag objects in the Git object store.
CAVEATS
This is a plumbing command. It is not designed for direct user interaction and should generally only be invoked by other Git commands or scripts that understand the precise format of Git tag objects. Incorrect input will likely result in an error or a malformed tag object. Users should typically use the higher-level git tag command for creating tags.
INPUT FORMAT FOR GIT-MKTAG
The standard input for git-mktag must be a correctly formatted tag object. A typical tag object content looks like this:
object <object_sha1>
type <object_type>
tag <tag_name>
tagger <tagger_name> <tagger_email> <timestamp> <timezone>
<tag_message>
For example:
object 0df3b1c6d8e7a9b0c1d2e3f4a5b6c7d8e9f0a1b2
type commit
tag v1.0
tagger John Doe <john.doe@example.com> 1678886400 +0000
Version 1.0 Release
The blank line after the tagger line and before the tag message is crucial.
SEE ALSO
git-tag(1), git-hash-object(1), git-cat-file(1)