{
    "mode": "man",
    "parameter": "git-hook",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/git-hook/1/json",
    "generated": "2026-10-21T15:23:14Z",
    "synopsis": "git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>]",
    "sections": {
        "NAME": {
            "content": "git-hook - Run git hooks\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git hook run [--ignore-missing] [--to-stdin=<path>] <hook-name> [-- <hook-args>]\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "A command interface for running git hooks (see githooks(5)), for use by other scripted git\ncommands.\n",
            "subsections": []
        },
        "SUBCOMMANDS": {
            "content": "run\nRun the <hook-name> hook. See githooks(5) for supported hook names.\n\nAny positional arguments to the hook should be passed after a mandatory -- (or\n--end-of-options, see gitcli(7)). See githooks(5) for arguments hooks might expect (if\nany).\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "",
            "subsections": [
                {
                    "name": "--to-stdin",
                    "content": "For \"run\"; specify a file which will be streamed into the hook’s stdin. The hook will\nreceive the entire file from beginning to EOF.\n",
                    "long": "--to-stdin"
                },
                {
                    "name": "--ignore-missing",
                    "content": "Ignore any missing hook by quietly returning zero. Used for tools that want to do a blind\none-shot run of a hook that may or may not be present.\n",
                    "long": "--ignore-missing"
                }
            ]
        },
        "SEE ALSO": {
            "content": "githooks(5)\n",
            "subsections": []
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\nGit 2.43.0                                   07/02/2025                                  GIT-HOOK(1)",
            "subsections": []
        }
    },
    "summary": "git-hook - Run git hooks",
    "flags": [
        {
            "flag": "",
            "long": "--to-stdin",
            "arg": null,
            "description": "For \"run\"; specify a file which will be streamed into the hook’s stdin. The hook will receive the entire file from beginning to EOF."
        },
        {
            "flag": "",
            "long": "--ignore-missing",
            "arg": null,
            "description": "Ignore any missing hook by quietly returning zero. Used for tools that want to do a blind one-shot run of a hook that may or may not be present."
        }
    ],
    "examples": [],
    "see_also": [
        {
            "name": "githooks",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/githooks/5/json"
        }
    ]
}