{
    "mode": "man",
    "parameter": "GIT-HTTP-FETCH",
    "section": "1",
    "url": "https://www.chedong.com/phpMan.php/man/GIT-HTTP-FETCH/1/json",
    "generated": "2026-06-13T22:42:09Z",
    "synopsis": "git http-fetch [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [--stdin | --packfile=<hash> | <commit>] <url>",
    "sections": {
        "NAME": {
            "content": "git-http-fetch - Download from a remote Git repository via HTTP\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "git http-fetch [-c] [-t] [-a] [-d] [-v] [-w filename] [--recover] [--stdin | --packfile=<hash> | <commit>] <url>\n\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "Downloads a remote Git repository via HTTP.\n\nThis command always gets all objects. Historically, there were three options -a, -c and -t\nfor choosing which objects to download. They are now silently ignored.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "commit-id\nEither the hash or the filename under [URL]/refs/ to pull.\n",
            "subsections": [
                {
                    "name": "-a, -c, -t",
                    "content": "These options are ignored for historical reasons.\n",
                    "flag": "-t"
                },
                {
                    "name": "-v",
                    "content": "Report what is downloaded.\n",
                    "flag": "-v"
                },
                {
                    "name": "-w <filename>",
                    "content": "Writes the commit-id into the filename under $GITDIR/refs/<filename> on the local end\nafter the transfer is complete.\n",
                    "flag": "-w",
                    "arg": "<filename>"
                },
                {
                    "name": "--stdin",
                    "content": "Instead of a commit id on the command line (which is not expected in this case), git\nhttp-fetch expects lines on stdin in the format\n\n<commit-id>['\\t'<filename-as-in--w>]\n\n--packfile=<hash>\nFor internal use only. Instead of a commit id on the command line (which is not expected\nin this case), git http-fetch fetches the packfile directly at the given URL and uses\nindex-pack to generate corresponding .idx and .keep files. The hash is used to determine\nthe name of the temporary file and is arbitrary. The output of index-pack is printed to\nstdout. Requires --index-pack-args.\n\n--index-pack-args=<args>\nFor internal use only. The command to run on the contents of the downloaded pack.\nArguments are URL-encoded separated by spaces.\n",
                    "long": "--stdin"
                },
                {
                    "name": "--recover",
                    "content": "Verify that everything reachable from target is fetched. Used after an earlier fetch is\ninterrupted.\n",
                    "long": "--recover"
                }
            ]
        },
        "GIT": {
            "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                            GIT-HTTP-FETCH(1)",
            "subsections": []
        }
    },
    "summary": "git-http-fetch - Download from a remote Git repository via HTTP",
    "flags": [
        {
            "flag": "-t",
            "long": null,
            "arg": null,
            "description": "These options are ignored for historical reasons."
        },
        {
            "flag": "-v",
            "long": null,
            "arg": null,
            "description": "Report what is downloaded."
        },
        {
            "flag": "-w",
            "long": null,
            "arg": "<filename>",
            "description": "Writes the commit-id into the filename under $GITDIR/refs/<filename> on the local end after the transfer is complete."
        },
        {
            "flag": "",
            "long": "--stdin",
            "arg": null,
            "description": "Instead of a commit id on the command line (which is not expected in this case), git http-fetch expects lines on stdin in the format <commit-id>['\\t'<filename-as-in--w>] --packfile=<hash> For internal use only. Instead of a commit id on the command line (which is not expected in this case), git http-fetch fetches the packfile directly at the given URL and uses index-pack to generate corresponding .idx and .keep files. The hash is used to determine the name of the temporary file and is arbitrary. The output of index-pack is printed to stdout. Requires --index-pack-args. --index-pack-args=<args> For internal use only. The command to run on the contents of the downloaded pack. Arguments are URL-encoded separated by spaces."
        },
        {
            "flag": "",
            "long": "--recover",
            "arg": null,
            "description": "Verify that everything reachable from target is fetched. Used after an earlier fetch is interrupted."
        }
    ],
    "examples": [],
    "see_also": []
}