{
    "content": [
        {
            "type": "text",
            "text": "# git-write-tree (info)\n\n## NAME\n\ngit-write-tree - Create a tree object from the current index\n\n## SYNOPSIS\n\ngit write-tree [--missing-ok] [--prefix=<prefix>/]\n\n## DESCRIPTION\n\nCreates a tree object using the current index. The name of the new tree\nobject is printed to standard output.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (1 subsections)\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-write-tree",
        "section": "",
        "mode": "info",
        "summary": "git-write-tree - Create a tree object from the current index",
        "synopsis": "git write-tree [--missing-ok] [--prefix=<prefix>/]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": "--missing-ok",
                "arg": null,
                "description": "Normally git write-tree ensures that the objects referenced by the directory exist in the object database. This option disables this check. --prefix=<prefix>/ Writes a tree object that represents a subdirectory <prefix>. This can be used to write the tree object for a subproject that is in the named subdirectory."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 10,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--missing-ok",
                        "lines": 9,
                        "long": "--missing-ok"
                    }
                ]
            },
            {
                "name": "GIT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-write-tree - Create a tree object from the current index\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git write-tree [--missing-ok] [--prefix=<prefix>/]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Creates a tree object using the current index. The name of the new tree\nobject is printed to standard output.\n\nThe index must be in a fully merged state.\n\nConceptually, git write-tree sync()s the current index contents into a\nset of tree files. In order to have that match what is actually in your\ndirectory right now, you need to have done a git update-index phase\nbefore you did the git write-tree.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--missing-ok",
                        "content": "Normally git write-tree ensures that the objects referenced by the\ndirectory exist in the object database. This option disables this\ncheck.\n\n--prefix=<prefix>/\nWrites a tree object that represents a subdirectory <prefix>. This\ncan be used to write the tree object for a subproject that is in\nthe named subdirectory.\n",
                        "long": "--missing-ok"
                    }
                ]
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\nGit 2.34.1                        02/26/2026                 GIT-WRITE-TREE(1)",
                "subsections": []
            }
        }
    }
}