1GIT-MKTAG(1) Git Manual GIT-MKTAG(1)
2
3
4
6 git-mktag - Creates a tag object with extra validation
7
9 git mktag
10
12 Reads a tag’s contents on standard input and creates a tag object. The
13 output is the new tag’s <object> identifier.
14
15 This command is mostly equivalent to git-hash-object(1) invoked with -t
16 tag -w --stdin. I.e. both of these will create and write a tag found in
17 my-tag:
18
19 git mktag <my-tag
20 git hash-object -t tag -w --stdin <my-tag
21
22 The difference is that mktag will die before writing the tag if the tag
23 doesn’t pass a git-fsck(1) check.
24
25 The "fsck" check done by mktag is stricter than what git-fsck(1) would
26 run by default in that all fsck.<msg-id> messages are promoted from
27 warnings to errors (so e.g. a missing "tagger" line is an error).
28
29 Extra headers in the object are also an error under mktag, but ignored
30 by git-fsck(1). This extra check can be turned off by setting the
31 appropriate fsck.<msg-id> variable:
32
33 git -c fsck.extraHeaderEntry=ignore mktag <my-tag-with-headers
34
36 --strict
37 By default mktag turns on the equivalent of git-fsck(1) --strict
38 mode. Use --no-strict to disable it.
39
41 A tag signature file, to be fed to this command’s standard input, has a
42 very simple fixed format: four lines of
43
44 object <hash>
45 type <typename>
46 tag <tagname>
47 tagger <tagger>
48
49 followed by some optional free-form message (some tags created by older
50 Git may not have a tagger line). The message, when it exists, is
51 separated by a blank line from the header. The message part may contain
52 a signature that Git itself doesn’t care about, but that can be
53 verified with gpg.
54
56 Part of the git(1) suite
57
58
59
60Git 2.43.0 11/20/2023 GIT-MKTAG(1)