<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect2 SYSTEM "../../../dtd/dblite.dtd">

<sect2 lang="en" id="git-http-fetch(1)">
    <title>git-http-fetch(1)</title>
    <date>2024-07-02</date>
<revhistory><revision><date>2024-07-02</date></revision></revhistory>
<indexterm>
<primary>git-http-fetch(1)</primary>
</indexterm>
<simplesect id="git-http-fetch(1)__name">
<title>NAME</title>
<simpara>git-http-fetch - Download from a remote Git repository via HTTP</simpara>
</simplesect>
<simplesect id="git-http-fetch(1)__synopsis">
<title>SYNOPSIS</title>
<blockquote>
<literallayout><emphasis>git http-fetch</emphasis> [-c] [-t] [-a] [-d] [-v] [-w &lt;filename&gt;] [--recover] [--stdin | --packfile=&lt;hash&gt; | &lt;commit&gt;] &lt;URL&gt;</literallayout>
</blockquote>
</simplesect>
<simplesect id="git-http-fetch(1)__description">
<title>DESCRIPTION</title>
<simpara>Downloads a remote Git repository via HTTP.</simpara>
<simpara>This command always gets all objects. Historically, there were three options
<emphasis>-a</emphasis>, <emphasis>-c</emphasis> and <emphasis>-t</emphasis> for choosing which objects to download. They are now
silently ignored.</simpara>
</simplesect>
<simplesect id="git-http-fetch(1)__options">
<title>OPTIONS</title>
<variablelist>
<varlistentry>
<term>
commit-id
</term>
<listitem>
<simpara>
        Either the hash or the filename under [URL]/refs/ to
        pull.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-a, -c, -t
</term>
<listitem>
<simpara>
        These options are ignored for historical reasons.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-v
</term>
<listitem>
<simpara>
        Report what is downloaded.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
-w &lt;filename&gt;
</term>
<listitem>
<simpara>
        Writes the commit-id into the specified filename under $GIT_DIR/refs/&lt;filename&gt; on
        the local end after the transfer is complete.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--stdin
</term>
<listitem>
<simpara>
        Instead of a commit id on the command line (which is not expected in this
        case), <emphasis>git http-fetch</emphasis> expects lines on stdin in the format
</simpara>
<literallayout class="monospaced">&lt;commit-id&gt;['\t'&lt;filename-as-in--w&gt;]</literallayout>
</listitem>
</varlistentry>
<varlistentry>
<term>
--packfile=&lt;hash&gt;
</term>
<listitem>
<simpara>
        For internal use only. Instead of a commit id on the command
        line (which is not expected in
        this case), <emphasis>git http-fetch</emphasis> 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.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--index-pack-args=&lt;args&gt;
</term>
<listitem>
<simpara>
        For internal use only. The command to run on the contents of the
        downloaded pack. Arguments are URL-encoded separated by spaces.
</simpara>
</listitem>
</varlistentry>
<varlistentry>
<term>
--recover
</term>
<listitem>
<simpara>
        Verify that everything reachable from target is fetched.  Used after
        an earlier fetch is interrupted.
</simpara>
</listitem>
</varlistentry>
</variablelist>
</simplesect>
<simplesect id="git-http-fetch(1)__git">
<title>GIT</title>
<simpara>Part of the <xref linkend="git(1)" /> suite</simpara>
</simplesect>
</sect2>
