{
    "content": [
        {
            "type": "text",
            "text": "# GIT-FETCH-PACK(1) (man)\n\n**Summary:** git-fetch-pack - Receive missing objects from another repository\n\n**Synopsis:** git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]\n[--upload-pack=<git-upload-pack>]\n[--depth=<n>] [--no-progress]\n[-v] <repository> [<refs>...]\n\n## Flags\n\n| Flag | Long | Arg | Description |\n|------|------|-----|-------------|\n| — | --all | — | Fetch all remote refs. |\n| — | --stdin | — | Take the list of refs from stdin, one per line. If there are refs specified on the command line in addition to this opti |\n| -q | --quiet | — | Pass -q flag to git unpack-objects; this makes the cloning process less verbose. |\n| -k | --keep | — | Do not invoke git unpack-objects on received data, but create a single packfile out of it instead, and store it in the o |\n| — | --thin | — | Fetch a \"thin\" pack, which records objects in deltified form based on objects not included in the pack to reduce network |\n| — | --include-tag | — | If the remote side supports it, annotated tags objects will be downloaded on the same connection as the other objects if |\n| — | --deepen-relative | — | Argument --depth specifies the number of commits from the current shallow boundary instead of from the tip of each remot |\n| — | --no-progress | — | Do not show the progress. |\n| — | --check-self-contained-and-connected | — | Output \"connectivity-ok\" if the received pack is self-contained and connected. |\n| -v | — | — | Run verbosely. <repository> The URL to the remote repository. <refs>... The remote heads to update from. This is relativ |\n\n## See Also\n\n- git-fetch(1)\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (6 lines)\n- **DESCRIPTION** (11 lines)\n- **OPTIONS** (1 lines) — 10 subsections\n  - --all (2 lines)\n  - --stdin (8 lines)\n  - -q, --quiet (2 lines)\n  - -k, --keep (4 lines)\n  - --thin (3 lines)\n  - --include-tag (27 lines)\n  - --deepen-relative (3 lines)\n  - --no-progress (2 lines)\n  - --check-self-contained-and-connected (2 lines)\n  - -v (13 lines)\n- **SEE ALSO** (2 lines)\n- **GIT** (5 lines)\n\n## Full Content\n\n### NAME\n\ngit-fetch-pack - Receive missing objects from another repository\n\n### SYNOPSIS\n\ngit fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]\n[--upload-pack=<git-upload-pack>]\n[--depth=<n>] [--no-progress]\n[-v] <repository> [<refs>...]\n\n### DESCRIPTION\n\nUsually you would want to use git fetch, which is a higher level wrapper of this command,\ninstead.\n\nInvokes git-upload-pack on a possibly remote repository and asks it to send objects missing\nfrom this repository, to update the named heads. The list of commits available locally is\nfound out by scanning the local refs/ hierarchy and sent to git-upload-pack running on the\nother end.\n\nThis command degenerates to download everything to complete the asked refs from the remote\nside when the local side does not have a common ancestor commit.\n\n### OPTIONS\n\n#### --all\n\nFetch all remote refs.\n\n#### --stdin\n\nTake the list of refs from stdin, one per line. If there are refs specified on the\ncommand line in addition to this option, then the refs from stdin are processed after\nthose on the command line.\n\nIf --stateless-rpc is specified together with this option then the list of refs must be\nin packet format (pkt-line). Each ref must be in a separate packet, and the list must end\nwith a flush packet.\n\n#### -q, --quiet\n\nPass -q flag to git unpack-objects; this makes the cloning process less verbose.\n\n#### -k, --keep\n\nDo not invoke git unpack-objects on received data, but create a single packfile out of it\ninstead, and store it in the object database. If provided twice then the pack is locked\nagainst repacking.\n\n#### --thin\n\nFetch a \"thin\" pack, which records objects in deltified form based on objects not\nincluded in the pack to reduce network traffic.\n\n#### --include-tag\n\nIf the remote side supports it, annotated tags objects will be downloaded on the same\nconnection as the other objects if the object the tag references is downloaded. The\ncaller must otherwise determine the tags this option made available.\n\n--upload-pack=<git-upload-pack>\nUse this to specify the path to git-upload-pack on the remote side, if is not found on\nyour $PATH. Installations of sshd ignores the user’s environment setup scripts for login\nshells (e.g. .bashprofile) and your privately installed git may not be found on the\nsystem default $PATH. Another workaround suggested is to set up your $PATH in \".bashrc\",\nbut this flag is for people who do not want to pay the overhead for non-interactive\nshells by having a lean .bashrc file (they set most of the things up in .bashprofile).\n\n--exec=<git-upload-pack>\nSame as --upload-pack=<git-upload-pack>.\n\n--depth=<n>\nLimit fetching to ancestor-chains not longer than n.  git-upload-pack treats the special\ndepth 2147483647 as infinite even if there is an ancestor-chain that long.\n\n--shallow-since=<date>\nDeepen or shorten the history of a shallow repository to include all reachable commits\nafter <date>.\n\n--shallow-exclude=<revision>\nDeepen or shorten the history of a shallow repository to exclude commits reachable from a\nspecified remote branch or tag. This option can be specified multiple times.\n\n#### --deepen-relative\n\nArgument --depth specifies the number of commits from the current shallow boundary\ninstead of from the tip of each remote branch history.\n\n#### --no-progress\n\nDo not show the progress.\n\n#### --check-self-contained-and-connected\n\nOutput \"connectivity-ok\" if the received pack is self-contained and connected.\n\n#### -v\n\nRun verbosely.\n\n<repository>\nThe URL to the remote repository.\n\n<refs>...\nThe remote heads to update from. This is relative to $GITDIR (e.g. \"HEAD\",\n\"refs/heads/master\"). When unspecified, update from all heads the remote side has.\n\nIf the remote has enabled the options uploadpack.allowTipSHA1InWant,\nuploadpack.allowReachableSHA1InWant, or uploadpack.allowAnySHA1InWant, they may\nalternatively be 40-hex sha1s present on the remote.\n\n### SEE ALSO\n\ngit-fetch(1)\n\n### GIT\n\nPart of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                            GIT-FETCH-PACK(1)\n\n"
        }
    ],
    "structuredContent": {
        "command": "GIT-FETCH-PACK",
        "section": "1",
        "mode": "man",
        "summary": "git-fetch-pack - Receive missing objects from another repository",
        "synopsis": "git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]\n[--upload-pack=<git-upload-pack>]\n[--depth=<n>] [--no-progress]\n[-v] <repository> [<refs>...]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "",
                "long": "--all",
                "arg": null,
                "description": "Fetch all remote refs."
            },
            {
                "flag": "",
                "long": "--stdin",
                "arg": null,
                "description": "Take the list of refs from stdin, one per line. If there are refs specified on the command line in addition to this option, then the refs from stdin are processed after those on the command line. If --stateless-rpc is specified together with this option then the list of refs must be in packet format (pkt-line). Each ref must be in a separate packet, and the list must end with a flush packet."
            },
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "Pass -q flag to git unpack-objects; this makes the cloning process less verbose."
            },
            {
                "flag": "-k",
                "long": "--keep",
                "arg": null,
                "description": "Do not invoke git unpack-objects on received data, but create a single packfile out of it instead, and store it in the object database. If provided twice then the pack is locked against repacking."
            },
            {
                "flag": "",
                "long": "--thin",
                "arg": null,
                "description": "Fetch a \"thin\" pack, which records objects in deltified form based on objects not included in the pack to reduce network traffic."
            },
            {
                "flag": "",
                "long": "--include-tag",
                "arg": null,
                "description": "If the remote side supports it, annotated tags objects will be downloaded on the same connection as the other objects if the object the tag references is downloaded. The caller must otherwise determine the tags this option made available. --upload-pack=<git-upload-pack> Use this to specify the path to git-upload-pack on the remote side, if is not found on your $PATH. Installations of sshd ignores the user’s environment setup scripts for login shells (e.g. .bashprofile) and your privately installed git may not be found on the system default $PATH. Another workaround suggested is to set up your $PATH in \".bashrc\", but this flag is for people who do not want to pay the overhead for non-interactive shells by having a lean .bashrc file (they set most of the things up in .bashprofile). --exec=<git-upload-pack> Same as --upload-pack=<git-upload-pack>. --depth=<n> Limit fetching to ancestor-chains not longer than n. git-upload-pack treats the special depth 2147483647 as infinite even if there is an ancestor-chain that long. --shallow-since=<date> Deepen or shorten the history of a shallow repository to include all reachable commits after <date>. --shallow-exclude=<revision> Deepen or shorten the history of a shallow repository to exclude commits reachable from a specified remote branch or tag. This option can be specified multiple times."
            },
            {
                "flag": "",
                "long": "--deepen-relative",
                "arg": null,
                "description": "Argument --depth specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history."
            },
            {
                "flag": "",
                "long": "--no-progress",
                "arg": null,
                "description": "Do not show the progress."
            },
            {
                "flag": "",
                "long": "--check-self-contained-and-connected",
                "arg": null,
                "description": "Output \"connectivity-ok\" if the received pack is self-contained and connected."
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "Run verbosely. <repository> The URL to the remote repository. <refs>... The remote heads to update from. This is relative to $GITDIR (e.g. \"HEAD\", \"refs/heads/master\"). When unspecified, update from all heads the remote side has. If the remote has enabled the options uploadpack.allowTipSHA1InWant, uploadpack.allowReachableSHA1InWant, or uploadpack.allowAnySHA1InWant, they may alternatively be 40-hex sha1s present on the remote."
            }
        ],
        "examples": [],
        "see_also": [
            {
                "name": "git-fetch",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-fetch/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 11,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "--all",
                        "lines": 2,
                        "long": "--all"
                    },
                    {
                        "name": "--stdin",
                        "lines": 8,
                        "long": "--stdin"
                    },
                    {
                        "name": "-q, --quiet",
                        "lines": 2,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-k, --keep",
                        "lines": 4,
                        "flag": "-k",
                        "long": "--keep"
                    },
                    {
                        "name": "--thin",
                        "lines": 3,
                        "long": "--thin"
                    },
                    {
                        "name": "--include-tag",
                        "lines": 27,
                        "long": "--include-tag"
                    },
                    {
                        "name": "--deepen-relative",
                        "lines": 3,
                        "long": "--deepen-relative"
                    },
                    {
                        "name": "--no-progress",
                        "lines": 2,
                        "long": "--no-progress"
                    },
                    {
                        "name": "--check-self-contained-and-connected",
                        "lines": 2,
                        "long": "--check-self-contained-and-connected"
                    },
                    {
                        "name": "-v",
                        "lines": 13,
                        "flag": "-v"
                    }
                ]
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-fetch-pack - Receive missing objects from another repository\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git fetch-pack [--all] [--quiet|-q] [--keep|-k] [--thin] [--include-tag]\n[--upload-pack=<git-upload-pack>]\n[--depth=<n>] [--no-progress]\n[-v] <repository> [<refs>...]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Usually you would want to use git fetch, which is a higher level wrapper of this command,\ninstead.\n\nInvokes git-upload-pack on a possibly remote repository and asks it to send objects missing\nfrom this repository, to update the named heads. The list of commits available locally is\nfound out by scanning the local refs/ hierarchy and sent to git-upload-pack running on the\nother end.\n\nThis command degenerates to download everything to complete the asked refs from the remote\nside when the local side does not have a common ancestor commit.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "--all",
                        "content": "Fetch all remote refs.\n",
                        "long": "--all"
                    },
                    {
                        "name": "--stdin",
                        "content": "Take the list of refs from stdin, one per line. If there are refs specified on the\ncommand line in addition to this option, then the refs from stdin are processed after\nthose on the command line.\n\nIf --stateless-rpc is specified together with this option then the list of refs must be\nin packet format (pkt-line). Each ref must be in a separate packet, and the list must end\nwith a flush packet.\n",
                        "long": "--stdin"
                    },
                    {
                        "name": "-q, --quiet",
                        "content": "Pass -q flag to git unpack-objects; this makes the cloning process less verbose.\n",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-k, --keep",
                        "content": "Do not invoke git unpack-objects on received data, but create a single packfile out of it\ninstead, and store it in the object database. If provided twice then the pack is locked\nagainst repacking.\n",
                        "flag": "-k",
                        "long": "--keep"
                    },
                    {
                        "name": "--thin",
                        "content": "Fetch a \"thin\" pack, which records objects in deltified form based on objects not\nincluded in the pack to reduce network traffic.\n",
                        "long": "--thin"
                    },
                    {
                        "name": "--include-tag",
                        "content": "If the remote side supports it, annotated tags objects will be downloaded on the same\nconnection as the other objects if the object the tag references is downloaded. The\ncaller must otherwise determine the tags this option made available.\n\n--upload-pack=<git-upload-pack>\nUse this to specify the path to git-upload-pack on the remote side, if is not found on\nyour $PATH. Installations of sshd ignores the user’s environment setup scripts for login\nshells (e.g. .bashprofile) and your privately installed git may not be found on the\nsystem default $PATH. Another workaround suggested is to set up your $PATH in \".bashrc\",\nbut this flag is for people who do not want to pay the overhead for non-interactive\nshells by having a lean .bashrc file (they set most of the things up in .bashprofile).\n\n--exec=<git-upload-pack>\nSame as --upload-pack=<git-upload-pack>.\n\n--depth=<n>\nLimit fetching to ancestor-chains not longer than n.  git-upload-pack treats the special\ndepth 2147483647 as infinite even if there is an ancestor-chain that long.\n\n--shallow-since=<date>\nDeepen or shorten the history of a shallow repository to include all reachable commits\nafter <date>.\n\n--shallow-exclude=<revision>\nDeepen or shorten the history of a shallow repository to exclude commits reachable from a\nspecified remote branch or tag. This option can be specified multiple times.\n",
                        "long": "--include-tag"
                    },
                    {
                        "name": "--deepen-relative",
                        "content": "Argument --depth specifies the number of commits from the current shallow boundary\ninstead of from the tip of each remote branch history.\n",
                        "long": "--deepen-relative"
                    },
                    {
                        "name": "--no-progress",
                        "content": "Do not show the progress.\n",
                        "long": "--no-progress"
                    },
                    {
                        "name": "--check-self-contained-and-connected",
                        "content": "Output \"connectivity-ok\" if the received pack is self-contained and connected.\n",
                        "long": "--check-self-contained-and-connected"
                    },
                    {
                        "name": "-v",
                        "content": "Run verbosely.\n\n<repository>\nThe URL to the remote repository.\n\n<refs>...\nThe remote heads to update from. This is relative to $GITDIR (e.g. \"HEAD\",\n\"refs/heads/master\"). When unspecified, update from all heads the remote side has.\n\nIf the remote has enabled the options uploadpack.allowTipSHA1InWant,\nuploadpack.allowReachableSHA1InWant, or uploadpack.allowAnySHA1InWant, they may\nalternatively be 40-hex sha1s present on the remote.\n",
                        "flag": "-v"
                    }
                ]
            },
            "SEE ALSO": {
                "content": "git-fetch(1)\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                            GIT-FETCH-PACK(1)",
                "subsections": []
            }
        }
    }
}