{
    "content": [
        {
            "type": "text",
            "text": "# git-hash-object (info)\n\n## NAME\n\ngit-hash-object - Compute object ID and optionally creates a blob from a file\n\n## SYNOPSIS\n\ngit hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...\ngit hash-object [-t <type>] [-w] --stdin-paths [--no-filters]\n\n## DESCRIPTION\n\nComputes the object ID value for an object with specified type with the\ncontents of the named file (which can be outside of the work tree), and\noptionally writes the resulting object into the object database.\nReports its object ID to its standard output. When <type> is not\nspecified, it defaults to \"blob\".\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (7 subsections)\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-hash-object",
        "section": "",
        "mode": "info",
        "summary": "git-hash-object - Compute object ID and optionally creates a blob from a file",
        "synopsis": "git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...\ngit hash-object [-t <type>] [-w] --stdin-paths [--no-filters]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-t",
                "long": null,
                "arg": "<type>",
                "description": "Specify the type (default: \"blob\")."
            },
            {
                "flag": "-w",
                "long": null,
                "arg": null,
                "description": "Actually write the object into the object database."
            },
            {
                "flag": "",
                "long": "--stdin",
                "arg": null,
                "description": "Read the object from standard input instead of from a file."
            },
            {
                "flag": "",
                "long": "--stdin-paths",
                "arg": null,
                "description": "Read file names from the standard input, one per line, instead of from the command-line."
            },
            {
                "flag": "",
                "long": "--path",
                "arg": null,
                "description": "Hash object as it were located at the given path. The location of file does not directly influence on the hash value, but path is used to determine what Git filters should be applied to the object before it can be placed to the object database, and, as result of applying filters, the actual blob put into the object database may differ from the given file. This option is mainly useful for hashing temporary files located outside of the working directory or files read from stdin."
            },
            {
                "flag": "",
                "long": "--no-filters",
                "arg": null,
                "description": "Hash the contents as is, ignoring any input filter that would have been chosen by the attributes mechanism, including the end-of-line conversion. If the file is read from standard input then this is always implied, unless the --path option is given."
            },
            {
                "flag": "",
                "long": "--literally",
                "arg": null,
                "description": "Allow --stdin to hash any garbage into a loose object which might not otherwise pass standard object parsing or git-fsck checks. Useful for stress-testing Git itself or reproducing characteristics of corrupt or bogus objects encountered in the wild."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-t <type>",
                        "lines": 2,
                        "flag": "-t",
                        "arg": "<type>"
                    },
                    {
                        "name": "-w",
                        "lines": 2,
                        "flag": "-w"
                    },
                    {
                        "name": "--stdin",
                        "lines": 2,
                        "long": "--stdin"
                    },
                    {
                        "name": "--stdin-paths",
                        "lines": 3,
                        "long": "--stdin-paths"
                    },
                    {
                        "name": "--path",
                        "lines": 9,
                        "long": "--path"
                    },
                    {
                        "name": "--no-filters",
                        "lines": 5,
                        "long": "--no-filters"
                    },
                    {
                        "name": "--literally",
                        "lines": 5,
                        "long": "--literally"
                    }
                ]
            },
            {
                "name": "GIT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-hash-object - Compute object ID and optionally creates a blob from\na file\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git hash-object [-t <type>] [-w] [--path=<file>|--no-filters] [--stdin [--literally]] [--] <file>...\ngit hash-object [-t <type>] [-w] --stdin-paths [--no-filters]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Computes the object ID value for an object with specified type with the\ncontents of the named file (which can be outside of the work tree), and\noptionally writes the resulting object into the object database.\nReports its object ID to its standard output. When <type> is not\nspecified, it defaults to \"blob\".\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-t <type>",
                        "content": "Specify the type (default: \"blob\").\n",
                        "flag": "-t",
                        "arg": "<type>"
                    },
                    {
                        "name": "-w",
                        "content": "Actually write the object into the object database.\n",
                        "flag": "-w"
                    },
                    {
                        "name": "--stdin",
                        "content": "Read the object from standard input instead of from a file.\n",
                        "long": "--stdin"
                    },
                    {
                        "name": "--stdin-paths",
                        "content": "Read file names from the standard input, one per line, instead of\nfrom the command-line.\n",
                        "long": "--stdin-paths"
                    },
                    {
                        "name": "--path",
                        "content": "Hash object as it were located at the given path. The location of\nfile does not directly influence on the hash value, but path is\nused to determine what Git filters should be applied to the object\nbefore it can be placed to the object database, and, as result of\napplying filters, the actual blob put into the object database may\ndiffer from the given file. This option is mainly useful for\nhashing temporary files located outside of the working directory or\nfiles read from stdin.\n",
                        "long": "--path"
                    },
                    {
                        "name": "--no-filters",
                        "content": "Hash the contents as is, ignoring any input filter that would have\nbeen chosen by the attributes mechanism, including the end-of-line\nconversion. If the file is read from standard input then this is\nalways implied, unless the --path option is given.\n",
                        "long": "--no-filters"
                    },
                    {
                        "name": "--literally",
                        "content": "Allow --stdin to hash any garbage into a loose object which might\nnot otherwise pass standard object parsing or git-fsck checks.\nUseful for stress-testing Git itself or reproducing characteristics\nof corrupt or bogus objects encountered in the wild.\n",
                        "long": "--literally"
                    }
                ]
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\nGit 2.34.1                        02/26/2026                GIT-HASH-OBJECT(1)",
                "subsections": []
            }
        }
    }
}