{
    "mode": "man",
    "parameter": "git-mktag",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/git-mktag/1/json",
    "generated": "2026-05-30T06:05:47Z",
    "synopsis": "git mktag",
    "sections": {
        "NAME": {
            "content": "git-mktag - Creates a tag object with extra validation\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git mktag\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Reads a tag contents on standard input and creates a tag object. The output is the new tag’s\n<object> identifier.\n\nThis command is mostly equivalent to git-hash-object(1) invoked with -t tag -w --stdin. I.e.\nboth of these will create and write a tag found in my-tag:\n\ngit mktag <my-tag\ngit hash-object -t tag -w --stdin <my-tag\n\nThe difference is that mktag will die before writing the tag if the tag doesn’t pass a git-\nfsck(1) check.\n\nThe \"fsck\" check done mktag is stricter than what git-fsck(1) would run by default in that\nall fsck.<msg-id> messages are promoted from warnings to errors (so e.g. a missing \"tagger\"\nline is an error).\n\nExtra headers in the object are also an error under mktag, but ignored by git-fsck(1). This\nextra check can be turned off by setting the appropriate fsck.<msg-id> varible:\n\ngit -c fsck.extraHeaderEntry=ignore mktag <my-tag-with-headers\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--strict",
                    "content": "By default mktag turns on the equivalent of git-fsck(1) --strict mode. Use --no-strict to\ndisable it.\n",
                    "long": "--strict"
                }
            ]
        },
        "TAG FORMAT": {
            "content": "A tag signature file, to be fed to this command’s standard input, has a very simple fixed\nformat: four lines of\n\nobject <hash>\ntype <typename>\ntag <tagname>\ntagger <tagger>\n\nfollowed by some optional free-form message (some tags created by older Git may not have\ntagger line). The message, when it exists, is separated by a blank line from the header. The\nmessage part may contain a signature that Git itself doesn’t care about, but that can be\nverified with gpg.\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                                 GIT-MKTAG(1)",
            "subsections": []
        }
    },
    "summary": "git-mktag - Creates a tag object with extra validation",
    "flags": [
        {
            "flag": "",
            "long": "--strict",
            "arg": null,
            "description": "By default mktag turns on the equivalent of git-fsck(1) --strict mode. Use --no-strict to disable it."
        }
    ],
    "examples": [],
    "see_also": []
}