Object-by-object download over plain HTTP.
git http-fetch walks a remote repository over plain HTTP, downloading objects one by one starting from a given commit. It exists for the ancient dumb-HTTP transport, where the server is just a static file host with no Git CGI.
Smart HTTP negotiates a single packfile for the whole transfer; dumb HTTP cannot. http-fetch instead does what an old web spider would: GET an object, parse it, GET its referenced objects, repeat. Many round trips, no negotiation.
git http-fetch [-c] [-t] [-a] [-v] [-w <filename>]
[--recover] [--stdin] <commit> <url>
Pulls the commit's reachable history from <url> into the current repo's object store. With `--stdin`, reads `<sha> <ref>` lines instead.| Flag | What it does |
|---|---|
<commit> <url> | Starting commit SHA and the remote base URL (no trailing info/refs). |
-c | Also fetch commit history (default for normal use; explicit here). |
-t | Also fetch tags reachable from the walked commits. |
-a | Equivalent to -c -t; fetch commits and tags. |
-v | Verbose -- print each object SHA as it lands on disk. |
-w <filename> | Write the resolved tip SHA into <filename> after success. |
--recover | Resume an interrupted fetch by filling missing objects. |
--recover.git http-fetch -a abcd1234 http://127.0.0.1/repo.git/git http-fetch -v -w FETCH_HEAD abcd1234 http://127.0.0.1/repo.git/git http-fetch --recover abcd1234 http://127.0.0.1/repo.git/echo 'abcd1234 refs/heads/main' | git http-fetch --stdin http://127.0.0.1/repo.git/git fetch against a http-backend CGI) instead.update-server-info recently.-v while diagnosing; the per-object output makes round-trip pain visible.info/refs on the remote leads to 'object not found' errors mid-walk.-a, tags reachable from the commit may be skipped, leaving annotated tags missing.Hit each option, then Check answers. Score is recorded; Next is always open.