{
    "content": [
        {
            "type": "text",
            "text": "# git-write-tree(1) (man)\n\n**Summary:** git-write-tree - Create a tree object from the current index\n\n**Synopsis:** git write-tree [--missing-ok] [--prefix=<prefix>/]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --missing-ok | — | Normally git write-tree ensures that the objects referenced by the directory exist in the object database. This option d |\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (3 lines)\n- **DESCRIPTION** (9 lines)\n- **OPTIONS** (1 lines) — 1 subsections\n  - --missing-ok (7 lines)\n- **GIT** (5 lines)\n\n## Full Content\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 object is printed to\nstandard output.\n\nThe index must be in a fully merged state.\n\nConceptually, git write-tree sync()s the current index contents into a set of tree files. In\norder to have that match what is actually in your directory right now, you need to have done\na git update-index phase before you did the git write-tree.\n\n### OPTIONS\n\n#### --missing-ok\n\nNormally git write-tree ensures that the objects referenced by the directory exist in the\nobject database. This option disables this check.\n\n--prefix=<prefix>/\nWrites a tree object that represents a subdirectory <prefix>. This can be used to write\nthe tree object for a subproject that is in the named subdirectory.\n\n### GIT\n\nPart of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                            GIT-WRITE-TREE(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "git-write-tree",
        "section": "1",
        "mode": "man",
        "summary": "git-write-tree - Create a tree object from the current index",
        "synopsis": "git write-tree [--missing-ok] [--prefix=<prefix>/]",
        "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": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 9,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--missing-ok",
                        "lines": 7,
                        "long": "--missing-ok"
                    }
                ]
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ]
    }
}