{
    "content": [
        {
            "type": "text",
            "text": "# git-pull (man)\n\n## NAME\n\ngit-pull - Fetch from and integrate with another repository or a local branch\n\n## SYNOPSIS\n\ngit pull [<options>] [<repository> [<refspec>...]]\n\n## DESCRIPTION\n\nIncorporates changes from a remote repository into the current branch. If the current branch\nis behind the remote, then by default it will fast-forward the current branch to match the\nremote. If the current branch and the remote have diverged, the user needs to specify how to\nreconcile the divergent branches with --rebase or --no-rebase (or the corresponding\nconfiguration option in pull.rebase).\n\n## TLDR\n\n> Fetch branch from a remote repository and merge it to local repository.\n\n- Download changes from default remote repository and merge it:\n  `git pull`\n- Download changes from default remote repository and use fast-forward:\n  `git pull {{-r|--rebase}}`\n- Download changes from given remote repository and branch, then merge them into `HEAD`:\n  `git pull {{remote_name}} {{branch}}`\n\n*Source: tldr-pages*\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (35 subsections)\n- **GIT URLS**\n- **REMOTES** (1 subsections)\n- **MERGE STRATEGIES**\n- **DEFAULT BEHAVIOUR**\n- **EXAMPLES**\n- **SECURITY**\n- **BUGS**\n- **SEE ALSO**\n- **GIT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "git-pull",
        "section": "",
        "mode": "man",
        "summary": "git-pull - Fetch from and integrate with another repository or a local branch",
        "synopsis": "git pull [<options>] [<repository> [<refspec>...]]",
        "tldr_summary": "Fetch branch from a remote repository and merge it to local repository.",
        "tldr_examples": [
            {
                "description": "Download changes from default remote repository and merge it",
                "command": "git pull"
            },
            {
                "description": "Download changes from default remote repository and use fast-forward",
                "command": "git pull {{-r|--rebase}}"
            },
            {
                "description": "Download changes from given remote repository and branch, then merge them into `HEAD`",
                "command": "git pull {{remote_name}} {{branch}}"
            }
        ],
        "tldr_source": "official",
        "flags": [
            {
                "flag": "-q",
                "long": "--quiet",
                "arg": null,
                "description": "This is passed to both underlying git-fetch to squelch reporting of during transfer, and underlying git-merge to squelch output during merging."
            },
            {
                "flag": "-v",
                "long": "--verbose",
                "arg": null,
                "description": "Pass --verbose to git-fetch and git-merge. --[no-]recurse-submodules[=yes|on-demand|no] This option controls if new commits of populated submodules should be fetched, and if the working trees of active submodules should be updated, too (see git-fetch(1), git- config(1) and gitmodules(5)). If the checkout is done via rebase, local submodule commits are rebased as well. If the update is done via merge, the submodule conflicts are resolved and checked out."
            },
            {
                "flag": "",
                "long": "--no-commit",
                "arg": null,
                "description": "Perform the merge and commit the result. This option can be used to override --no-commit. Only useful when merging. With --no-commit perform the merge and stop just before creating a merge commit, to give the user a chance to inspect and further tweak the merge result before committing. Note that fast-forward updates do not create a merge commit and therefore there is no way to stop those merges with --no-commit. Thus, if you want to ensure your branch is not changed or updated by the merge command, use --no-ff with --no-commit."
            },
            {
                "flag": "-e",
                "long": "--no-edit",
                "arg": null,
                "description": "Invoke an editor before committing successful mechanical merge to further edit the auto-generated merge message, so that the user can explain and justify the merge. The --no-edit option can be used to accept the auto-generated message (this is generally discouraged). Older scripts may depend on the historical behaviour of not allowing the user to edit the merge log message. They will see an editor opened when they run git merge. To make it easier to adjust such scripts to the updated behaviour, the environment variable GITMERGEAUTOEDIT can be set to no at the beginning of them. --cleanup=<mode> This option determines how the merge message will be cleaned up before committing. See git-commit(1) for more details. In addition, if the <mode> is given a value of scissors, scissors will be appended to MERGEMSG before being passed on to the commit machinery in the case of a merge conflict."
            },
            {
                "flag": "",
                "long": "--ff-only",
                "arg": null,
                "description": "Only update to the new history if there is no divergent local history. This is the default when no method for reconciling divergent histories is provided (via the --rebase=* flags)."
            },
            {
                "flag": "",
                "long": "--no-ff",
                "arg": null,
                "description": "When merging rather than rebasing, specifies how a merge is handled when the merged-in history is already a descendant of the current history. If merging is requested, --ff is the default unless merging an annotated (and possibly signed) tag that is not stored in its natural place in the refs/tags/ hierarchy, in which case --no-ff is assumed. With --ff, when possible resolve the merge as a fast-forward (only update the branch pointer to match the merged branch; do not create a merge commit). When not possible (when the merged-in history is not a descendant of the current history), create a merge commit. With --no-ff, create a merge commit in all cases, even when the merge could instead be resolved as a fast-forward. -S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign GPG-sign the resulting merge commit. The keyid argument is optional and defaults to the committer identity; if specified, it must be stuck to the option without a space. --no-gpg-sign is useful to countermand both commit.gpgSign configuration variable, and earlier --gpg-sign. --log[=<n>], --no-log In addition to branch names, populate the log message with one-line descriptions from at most <n> actual commits that are being merged. See also git-fmt-merge-msg(1). Only useful when merging. With --no-log do not list one-line descriptions from the actual commits being merged."
            },
            {
                "flag": "",
                "long": "--no-signoff",
                "arg": null,
                "description": "Add a Signed-off-by trailer by the committer at the end of the commit log message. The meaning of a signoff depends on the project to which you’re committing. For example, it may certify that the committer has the rights to submit the work under the project’s license or agrees to some contributor representation, such as a Developer Certificate of Origin. (See http://developercertificate.org for the one used by the Linux kernel and Git projects.) Consult the documentation or leadership of the project to which you’re contributing to understand how the signoffs are used in that project. The --no-signoff option can be used to countermand an earlier --signoff option on the command line."
            },
            {
                "flag": "-n",
                "long": "--no-stat",
                "arg": null,
                "description": "Show a diffstat at the end of the merge. The diffstat is also controlled by the configuration option merge.stat. With -n or --no-stat do not show a diffstat at the end of the merge."
            },
            {
                "flag": "",
                "long": "--no-squash",
                "arg": null,
                "description": "Produce the working tree and index state as if a real merge happened (except for the merge information), but do not actually make a commit, move the HEAD, or record $GITDIR/MERGEHEAD (to cause the next git commit command to create a merge commit). This allows you to create a single commit on top of the current branch whose effect is the same as merging another branch (or more in case of an octopus). With --no-squash perform the merge and commit the result. This option can be used to override --squash. With --squash, --commit is not allowed, and will fail. Only useful when merging. --[no-]verify By default, the pre-merge and commit-msg hooks are run. When --no-verify is given, these are bypassed. See also githooks(5). Only useful when merging. -s <strategy>, --strategy=<strategy> Use the given merge strategy; can be supplied more than once to specify them in the order they should be tried. If there is no -s option, a built-in list of strategies is used instead (ort when merging a single head, octopus otherwise). -X <option>, --strategy-option=<option> Pass merge strategy specific option through to the merge strategy."
            },
            {
                "flag": "",
                "long": "--no-verify-signatures",
                "arg": null,
                "description": "Verify that the tip commit of the side branch being merged is signed with a valid key, i.e. a key that has a valid uid: in the default trust model, this means the signing key has been signed by a trusted key. If the tip commit of the side branch is not signed with a valid key, the merge is aborted. Only useful when merging."
            },
            {
                "flag": "",
                "long": "--no-summary",
                "arg": null,
                "description": "Synonyms to --stat and --no-stat; these are deprecated and will be removed in the future."
            },
            {
                "flag": "",
                "long": "--no-autostash",
                "arg": null,
                "description": "Automatically create a temporary stash entry before the operation begins, record it in the special ref MERGEAUTOSTASH and apply it after the operation ends. This means that you can run the operation on a dirty worktree. However, use with care: the final stash application after a successful merge might result in non-trivial conflicts."
            },
            {
                "flag": "",
                "long": "--allow-unrelated-histories",
                "arg": null,
                "description": "By default, git merge command refuses to merge histories that do not share a common ancestor. This option can be used to override this safety when merging histories of two projects that started their lives independently. As that is a very rare occasion, no configuration variable to enable this by default exists and will not be added. Only useful when merging."
            },
            {
                "flag": "-r",
                "long": null,
                "arg": null,
                "description": "When true, rebase the current branch on top of the upstream branch after fetching. If there is a remote-tracking branch corresponding to the upstream branch and the upstream branch was rebased since last fetched, the rebase uses that information to avoid rebasing non-local changes. When set to merges, rebase using git rebase --rebase-merges so that the local merge commits are included in the rebase (see git-rebase(1) for details). When false, merge the upstream branch into the current branch. When interactive, enable the interactive mode of rebase. See pull.rebase, branch.<name>.rebase and branch.autoSetupRebase in git-config(1) if you want to make git pull always use --rebase instead of merging. Note This is a potentially dangerous mode of operation. It rewrites history, which does not bode well when you published that history already. Do not use this option unless you have read git-rebase(1) carefully."
            },
            {
                "flag": "",
                "long": "--no-rebase",
                "arg": null,
                "description": "This is shorthand for --rebase=false."
            },
            {
                "flag": "",
                "long": "--all",
                "arg": null,
                "description": "Fetch all remotes."
            },
            {
                "flag": "-a",
                "long": "--append",
                "arg": null,
                "description": "Append ref names and object names of fetched refs to the existing contents of .git/FETCHHEAD. Without this option old data in .git/FETCHHEAD will be overwritten."
            },
            {
                "flag": "",
                "long": "--atomic",
                "arg": null,
                "description": "Use an atomic transaction to update local refs. Either all refs are updated, or on error, no refs are updated. --depth=<depth> Limit fetching to the specified number of commits from the tip of each remote branch history. If fetching to a shallow repository created by git clone with --depth=<depth> option (see git-clone(1)), deepen or shorten the history to the specified number of commits. Tags for the deepened commits are not fetched. --deepen=<depth> Similar to --depth, except it specifies the number of commits from the current shallow boundary instead of from the tip of each remote branch history. --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": "--unshallow",
                "arg": null,
                "description": "If the source repository is complete, convert a shallow repository to a complete one, removing all the limitations imposed by shallow repositories. If the source repository is shallow, fetch as much as possible so that the current repository has the same history as the source repository."
            },
            {
                "flag": "",
                "long": "--update-shallow",
                "arg": null,
                "description": "By default when fetching from a shallow repository, git fetch refuses refs that require updating .git/shallow. This option updates .git/shallow and accept such refs. --negotiation-tip=<commit|glob> By default, Git will report, to the server, commits reachable from all local refs to find common commits in an attempt to reduce the size of the to-be-received packfile. If specified, Git will only report commits reachable from the given tips. This is useful to speed up fetches when the user knows which local ref is likely to have commits in common with the upstream ref being fetched. This option may be specified more than once; if so, Git will report commits reachable from any of the given commits. The argument to this option may be a glob on ref names, a ref, or the (possibly abbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying this option multiple times, one for each matching ref name. See also the fetch.negotiationAlgorithm and push.negotiate configuration variables documented in git-config(1), and the --negotiate-only option below."
            },
            {
                "flag": "",
                "long": "--negotiate-only",
                "arg": null,
                "description": "Do not fetch anything from the server, and instead print the ancestors of the provided --negotiation-tip=* arguments, which we have in common with the server. Internally this is used to implement the push.negotiate option, see git-config(1)."
            },
            {
                "flag": "",
                "long": "--dry-run",
                "arg": null,
                "description": "Show what would be done, without making any changes."
            },
            {
                "flag": "-f",
                "long": "--force",
                "arg": null,
                "description": "When git fetch is used with <src>:<dst> refspec it may refuse to update the local branch as discussed in the <refspec> part of the git-fetch(1) documentation. This option overrides that check."
            },
            {
                "flag": "-k",
                "long": "--keep",
                "arg": null,
                "description": "Keep downloaded pack."
            },
            {
                "flag": "",
                "long": "--prefetch",
                "arg": null,
                "description": "Modify the configured refspec to place all refs into the refs/prefetch/ namespace. See the prefetch task in git-maintenance(1)."
            },
            {
                "flag": "-p",
                "long": "--prune",
                "arg": null,
                "description": "Before fetching, remove any remote-tracking references that no longer exist on the remote. Tags are not subject to pruning if they are fetched only because of the default tag auto-following or due to a --tags option. However, if tags are fetched due to an explicit refspec (either on the command line or in the remote configuration, for example if the remote was cloned with the --mirror option), then they are also subject to pruning. Supplying --prune-tags is a shorthand for providing the tag refspec."
            },
            {
                "flag": "",
                "long": "--no-tags",
                "arg": null,
                "description": "By default, tags that point at objects that are downloaded from the remote repository are fetched and stored locally. This option disables this automatic tag following. The default behavior for a remote may be specified with the remote.<name>.tagOpt setting. See git-config(1). --refmap=<refspec> When fetching refs listed on the command line, use the specified refspec (can be given more than once) to map the refs to remote-tracking branches, instead of the values of remote.*.fetch configuration variables for the remote repository. Providing an empty <refspec> to the --refmap option causes Git to ignore the configured refspecs and rely entirely on the refspecs supplied as command-line arguments. See section on \"Configured Remote-tracking Branches\" for details."
            },
            {
                "flag": "-t",
                "long": "--tags",
                "arg": null,
                "description": "Fetch all tags from the remote (i.e., fetch remote tags refs/tags/* into local tags with the same name), in addition to whatever else would otherwise be fetched. Using this option alone does not subject tags to pruning, even if --prune is used (though tags may be pruned anyway if they are also the destination of an explicit refspec; see --prune). -j, --jobs=<n> Number of parallel children to be used for all forms of fetching. If the --multiple option was specified, the different remotes will be fetched in parallel. If multiple submodules are fetched, they will be fetched in parallel. To control them independently, use the config settings fetch.parallel and submodule.fetchJobs (see git-config(1)). Typically, parallel recursive and multi-remote fetches will be faster. By default fetches are performed sequentially, not in parallel."
            },
            {
                "flag": "",
                "long": "--set-upstream",
                "arg": null,
                "description": "If the remote is fetched successfully, add upstream (tracking) reference, used by argument-less git-pull(1) and other commands. For more information, see branch.<name>.merge and branch.<name>.remote in git-config(1)."
            },
            {
                "flag": "",
                "long": "--upload-pack",
                "arg": "<upload-pack>",
                "description": "When given, and the repository to fetch from is handled by git fetch-pack, --exec=<upload-pack> is passed to the command to specify non-default path for the command run on the other end."
            },
            {
                "flag": "",
                "long": "--progress",
                "arg": null,
                "description": "Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. This flag forces progress status even if the standard error stream is not directed to a terminal. -o <option>, --server-option=<option> Transmit the given string to the server when communicating using protocol version 2. The given string must not contain a NUL or LF character. The server’s handling of server options, including unknown ones, is server-specific. When multiple --server-option=<option> are given, they are all sent to the other side in the order listed on the command line."
            },
            {
                "flag": "",
                "long": "--show-forced-updates",
                "arg": null,
                "description": "By default, git checks if a branch is force-updated during fetch. This can be disabled through fetch.showForcedUpdates, but the --show-forced-updates option guarantees this check occurs. See git-config(1)."
            },
            {
                "flag": "",
                "long": "--no-show-forced-updates",
                "arg": null,
                "description": "By default, git checks if a branch is force-updated during fetch. Pass --no-show-forced-updates or set fetch.showForcedUpdates to false to skip this check for performance reasons. If used during git-pull the --ff-only option will still check for forced updates before attempting a fast-forward update. See git-config(1). -4, --ipv4 Use IPv4 addresses only, ignoring IPv6 addresses. -6, --ipv6 Use IPv6 addresses only, ignoring IPv4 addresses. <repository> The \"remote\" repository that is the source of a fetch or pull operation. This parameter can be either a URL (see the section GIT URLS below) or the name of a remote (see the section REMOTES below). <refspec> Specifies which refs to fetch and which local refs to update. When no <refspec>s appear on the command line, the refs to fetch are read from remote.<repository>.fetch variables instead (see the section \"CONFIGURED REMOTE-TRACKING BRANCHES\" in git-fetch(1)). The format of a <refspec> parameter is an optional plus +, followed by the source <src>, followed by a colon :, followed by the destination ref <dst>. The colon can be omitted when <dst> is empty. <src> is typically a ref, but it can also be a fully spelled hex object name. A <refspec> may contain a * in its <src> to indicate a simple pattern match. Such a refspec functions like a glob that matches any ref with the same prefix. A pattern <refspec> must have a * in both the <src> and <dst>. It will map refs to the destination by replacing the * with the contents matched from the source. If a refspec is prefixed by ^, it will be interpreted as a negative refspec. Rather than specifying which refs to fetch or which local refs to update, such a refspec will instead specify refs to exclude. A ref will be considered to match if it matches at least one positive refspec, and does not match any negative refspec. Negative refspecs can be useful to restrict the scope of a pattern refspec so that it will not include specific refs. Negative refspecs can themselves be pattern refspecs. However, they may only contain a <src> and do not specify a <dst>. Fully spelled out hex object names are also not supported. tag <tag> means the same as refs/tags/<tag>:refs/tags/<tag>; it requests fetching everything up to the given tag. The remote ref that matches <src> is fetched, and if <dst> is not an empty string, an attempt is made to update the local ref that matches it. Whether that update is allowed without --force depends on the ref namespace it’s being fetched to, the type of object being fetched, and whether the update is considered to be a fast-forward. Generally, the same rules apply for fetching as when pushing, see the <refspec>... section of git-push(1) for what those are. Exceptions to those rules particular to git fetch are noted below. Until Git version 2.20, and unlike when pushing with git-push(1), any updates to refs/tags/* would be accepted without + in the refspec (or --force). When fetching, we promiscuously considered all tag updates from a remote to be forced fetches. Since Git version 2.20, fetching to update refs/tags/* works the same way as when pushing. I.e. any updates will be rejected without + in the refspec (or --force). Unlike when pushing with git-push(1), any updates outside of refs/{tags,heads}/* will be accepted without + in the refspec (or --force), whether that’s swapping e.g. a tree object for a blob, or a commit for another commit that’s doesn’t have the previous commit as an ancestor etc. Unlike when pushing with git-push(1), there is no configuration which’ll amend these rules, and nothing like a pre-fetch hook analogous to the pre-receive hook. As with pushing with git-push(1), all of the rules described above about what’s not allowed as an update can be overridden by adding an the optional leading + to a refspec (or using --force command line option). The only exception to this is that no amount of forcing will make the refs/heads/* namespace accept a non-commit object. Note When the remote branch you want to fetch is known to be rewound and rebased regularly, it is expected that its new tip will not be descendant of its previous tip (as stored in your remote-tracking branch the last time you fetched). You would want to use the + sign to indicate non-fast-forward updates will be needed for such branches. There is no way to determine or declare that a branch will be made available in a repository with this behavior; the pulling user simply must know this is the expected usage pattern for a branch. Note There is a difference between listing multiple <refspec> directly on git pull command line and having multiple remote.<repository>.fetch entries in your configuration for a <repository> and running a git pull command without any explicit <refspec> parameters. <refspec>s listed explicitly on the command line are always merged into the current branch after fetching. In other words, if you list more than one remote ref, git pull will create an Octopus merge. On the other hand, if you do not list any explicit <refspec> parameter on the command line, git pull will fetch all the <refspec>s it finds in the remote.<repository>.fetch configuration and merge only the first <refspec> found into the current branch. This is because making an Octopus from remote refs is rarely done, while keeping track of multiple remote heads in one-go by fetching more than one is often useful."
            }
        ],
        "examples": [
            "•   Update the remote-tracking branches for the repository you cloned from, then merge one of",
            "them into your current branch:",
            "$ git pull",
            "$ git pull origin",
            "Normally the branch merged in is the HEAD of the remote repository, but the choice is",
            "determined by the branch.<name>.remote and branch.<name>.merge options; see git-config(1)",
            "for details.",
            "•   Merge into the current branch the remote branch next:",
            "$ git pull origin next",
            "This leaves a copy of next temporarily in FETCHHEAD, and updates the remote-tracking",
            "branch origin/next. The same can be done by invoking fetch and merge:",
            "$ git fetch origin",
            "$ git merge origin/next",
            "If you tried a pull which resulted in complex conflicts and would want to start over, you can",
            "recover with git reset."
        ],
        "see_also": [
            {
                "name": "git-fetch",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-fetch/1/json"
            },
            {
                "name": "git-merge",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-merge/1/json"
            },
            {
                "name": "git-config",
                "section": "1",
                "url": "https://www.chedong.com/phpMan.php/man/git-config/1/json"
            }
        ],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 47,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-q, --quiet",
                        "lines": 3,
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-v, --verbose",
                        "lines": 11,
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "Options related to merging",
                        "lines": 1
                    },
                    {
                        "name": "--commit, --no-commit",
                        "lines": 10,
                        "long": "--no-commit"
                    },
                    {
                        "name": "--edit, -e, --no-edit",
                        "lines": 16,
                        "flag": "-e",
                        "long": "--no-edit"
                    },
                    {
                        "name": "--ff-only",
                        "lines": 4,
                        "long": "--ff-only"
                    },
                    {
                        "name": "--ff, --no-ff",
                        "lines": 26,
                        "long": "--no-ff"
                    },
                    {
                        "name": "--signoff, --no-signoff",
                        "lines": 11,
                        "long": "--no-signoff"
                    },
                    {
                        "name": "--stat, -n, --no-stat",
                        "lines": 5,
                        "flag": "-n",
                        "long": "--no-stat"
                    },
                    {
                        "name": "--squash, --no-squash",
                        "lines": 25,
                        "long": "--no-squash"
                    },
                    {
                        "name": "--verify-signatures, --no-verify-signatures",
                        "lines": 7,
                        "long": "--no-verify-signatures"
                    },
                    {
                        "name": "--summary, --no-summary",
                        "lines": 2,
                        "long": "--no-summary"
                    },
                    {
                        "name": "--autostash, --no-autostash",
                        "lines": 5,
                        "long": "--no-autostash"
                    },
                    {
                        "name": "--allow-unrelated-histories",
                        "lines": 7,
                        "long": "--allow-unrelated-histories"
                    },
                    {
                        "name": "-r, --rebase[=false|true|merges|interactive]",
                        "lines": 20,
                        "flag": "-r"
                    },
                    {
                        "name": "--no-rebase",
                        "lines": 2,
                        "long": "--no-rebase"
                    },
                    {
                        "name": "Options related to fetching",
                        "lines": 1
                    },
                    {
                        "name": "--all",
                        "lines": 2,
                        "long": "--all"
                    },
                    {
                        "name": "-a, --append",
                        "lines": 3,
                        "flag": "-a",
                        "long": "--append"
                    },
                    {
                        "name": "--atomic",
                        "lines": 21,
                        "long": "--atomic"
                    },
                    {
                        "name": "--unshallow",
                        "lines": 6,
                        "long": "--unshallow"
                    },
                    {
                        "name": "--update-shallow",
                        "lines": 20,
                        "long": "--update-shallow"
                    },
                    {
                        "name": "--negotiate-only",
                        "lines": 5,
                        "long": "--negotiate-only"
                    },
                    {
                        "name": "--dry-run",
                        "lines": 2,
                        "long": "--dry-run"
                    },
                    {
                        "name": "-f, --force",
                        "lines": 4,
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-k, --keep",
                        "lines": 2,
                        "flag": "-k",
                        "long": "--keep"
                    },
                    {
                        "name": "--prefetch",
                        "lines": 3,
                        "long": "--prefetch"
                    },
                    {
                        "name": "-p, --prune",
                        "lines": 7,
                        "flag": "-p",
                        "long": "--prune"
                    },
                    {
                        "name": "--no-tags",
                        "lines": 13,
                        "long": "--no-tags"
                    },
                    {
                        "name": "-t, --tags",
                        "lines": 16,
                        "flag": "-t",
                        "long": "--tags"
                    },
                    {
                        "name": "--set-upstream",
                        "lines": 4,
                        "long": "--set-upstream"
                    },
                    {
                        "name": "--upload-pack <upload-pack>",
                        "lines": 4,
                        "long": "--upload-pack",
                        "arg": "<upload-pack>"
                    },
                    {
                        "name": "--progress",
                        "lines": 11,
                        "long": "--progress"
                    },
                    {
                        "name": "--show-forced-updates",
                        "lines": 4,
                        "long": "--show-forced-updates"
                    },
                    {
                        "name": "--no-show-forced-updates",
                        "lines": 93,
                        "long": "--no-show-forced-updates"
                    }
                ]
            },
            {
                "name": "GIT URLS",
                "lines": 91,
                "subsections": []
            },
            {
                "name": "REMOTES",
                "lines": 11,
                "subsections": [
                    {
                        "name": "Named remote in configuration file",
                        "lines": 51
                    }
                ]
            },
            {
                "name": "MERGE STRATEGIES",
                "lines": 124,
                "subsections": []
            },
            {
                "name": "DEFAULT BEHAVIOUR",
                "lines": 38,
                "subsections": []
            },
            {
                "name": "EXAMPLES",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "SECURITY",
                "lines": 25,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "GIT",
                "lines": 5,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "git-pull - Fetch from and integrate with another repository or a local branch\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "git pull [<options>] [<repository> [<refspec>...]]\n\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Incorporates changes from a remote repository into the current branch. If the current branch\nis behind the remote, then by default it will fast-forward the current branch to match the\nremote. If the current branch and the remote have diverged, the user needs to specify how to\nreconcile the divergent branches with --rebase or --no-rebase (or the corresponding\nconfiguration option in pull.rebase).\n\nMore precisely, git pull runs git fetch with the given parameters and then depending on\nconfiguration options or command line flags, will call either git rebase or git merge to\nreconcile diverging branches.\n\n<repository> should be the name of a remote repository as passed to git-fetch(1). <refspec>\ncan name an arbitrary remote ref (for example, the name of a tag) or even a collection of\nrefs with corresponding remote-tracking branches (e.g., refs/heads/*:refs/remotes/origin/*),\nbut usually it is the name of a branch in the remote repository.\n\nDefault values for <repository> and <branch> are read from the \"remote\" and \"merge\"\nconfiguration for the current branch as set by git-branch(1) --track.\n\nAssume the following history exists and the current branch is \"master\":\n\nA---B---C master on origin\n/\nD---E---F---G master\n^\norigin/master in your repository\n\n\nThen \"git pull\" will fetch and replay the changes from the remote master branch since it\ndiverged from the local master (i.e., E) until its current commit (C) on top of master and\nrecord the result in a new commit along with the names of the two parent commits and a log\nmessage from the user describing the changes.\n\nA---B---C origin/master\n/         \\\nD---E---F---G---H master\n\n\nSee git-merge(1) for details, including how conflicts are presented and handled.\n\nIn Git 1.7.0 or later, to cancel a conflicting merge, use git reset --merge. Warning: In\nolder versions of Git, running git pull with uncommitted changes is discouraged: while\npossible, it leaves you in a state that may be hard to back out of in the case of a conflict.\n\nIf any of the remote changes overlap with local uncommitted changes, the merge will be\nautomatically canceled and the work tree untouched. It is generally best to get any local\nchanges in working order before pulling or stash them away with git-stash(1).\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-q, --quiet",
                        "content": "This is passed to both underlying git-fetch to squelch reporting of during transfer, and\nunderlying git-merge to squelch output during merging.\n",
                        "flag": "-q",
                        "long": "--quiet"
                    },
                    {
                        "name": "-v, --verbose",
                        "content": "Pass --verbose to git-fetch and git-merge.\n\n--[no-]recurse-submodules[=yes|on-demand|no]\nThis option controls if new commits of populated submodules should be fetched, and if the\nworking trees of active submodules should be updated, too (see git-fetch(1), git-\nconfig(1) and gitmodules(5)).\n\nIf the checkout is done via rebase, local submodule commits are rebased as well.\n\nIf the update is done via merge, the submodule conflicts are resolved and checked out.\n",
                        "flag": "-v",
                        "long": "--verbose"
                    },
                    {
                        "name": "Options related to merging",
                        "content": ""
                    },
                    {
                        "name": "--commit, --no-commit",
                        "content": "Perform the merge and commit the result. This option can be used to override --no-commit.\nOnly useful when merging.\n\nWith --no-commit perform the merge and stop just before creating a merge commit, to give\nthe user a chance to inspect and further tweak the merge result before committing.\n\nNote that fast-forward updates do not create a merge commit and therefore there is no way\nto stop those merges with --no-commit. Thus, if you want to ensure your branch is not\nchanged or updated by the merge command, use --no-ff with --no-commit.\n",
                        "long": "--no-commit"
                    },
                    {
                        "name": "--edit, -e, --no-edit",
                        "content": "Invoke an editor before committing successful mechanical merge to further edit the\nauto-generated merge message, so that the user can explain and justify the merge. The\n--no-edit option can be used to accept the auto-generated message (this is generally\ndiscouraged).\n\nOlder scripts may depend on the historical behaviour of not allowing the user to edit the\nmerge log message. They will see an editor opened when they run git merge. To make it\neasier to adjust such scripts to the updated behaviour, the environment variable\nGITMERGEAUTOEDIT can be set to no at the beginning of them.\n\n--cleanup=<mode>\nThis option determines how the merge message will be cleaned up before committing. See\ngit-commit(1) for more details. In addition, if the <mode> is given a value of scissors,\nscissors will be appended to MERGEMSG before being passed on to the commit machinery in\nthe case of a merge conflict.\n",
                        "flag": "-e",
                        "long": "--no-edit"
                    },
                    {
                        "name": "--ff-only",
                        "content": "Only update to the new history if there is no divergent local history. This is the\ndefault when no method for reconciling divergent histories is provided (via the\n--rebase=* flags).\n",
                        "long": "--ff-only"
                    },
                    {
                        "name": "--ff, --no-ff",
                        "content": "When merging rather than rebasing, specifies how a merge is handled when the merged-in\nhistory is already a descendant of the current history. If merging is requested, --ff is\nthe default unless merging an annotated (and possibly signed) tag that is not stored in\nits natural place in the refs/tags/ hierarchy, in which case --no-ff is assumed.\n\nWith --ff, when possible resolve the merge as a fast-forward (only update the branch\npointer to match the merged branch; do not create a merge commit). When not possible\n(when the merged-in history is not a descendant of the current history), create a merge\ncommit.\n\nWith --no-ff, create a merge commit in all cases, even when the merge could instead be\nresolved as a fast-forward.\n\n-S[<keyid>], --gpg-sign[=<keyid>], --no-gpg-sign\nGPG-sign the resulting merge commit. The keyid argument is optional and defaults to the\ncommitter identity; if specified, it must be stuck to the option without a space.\n--no-gpg-sign is useful to countermand both commit.gpgSign configuration variable, and\nearlier --gpg-sign.\n\n--log[=<n>], --no-log\nIn addition to branch names, populate the log message with one-line descriptions from at\nmost <n> actual commits that are being merged. See also git-fmt-merge-msg(1). Only useful\nwhen merging.\n\nWith --no-log do not list one-line descriptions from the actual commits being merged.\n",
                        "long": "--no-ff"
                    },
                    {
                        "name": "--signoff, --no-signoff",
                        "content": "Add a Signed-off-by trailer by the committer at the end of the commit log message. The\nmeaning of a signoff depends on the project to which you’re committing. For example, it\nmay certify that the committer has the rights to submit the work under the project’s\nlicense or agrees to some contributor representation, such as a Developer Certificate of\nOrigin. (See http://developercertificate.org for the one used by the Linux kernel and Git\nprojects.) Consult the documentation or leadership of the project to which you’re\ncontributing to understand how the signoffs are used in that project.\n\nThe --no-signoff option can be used to countermand an earlier --signoff option on the\ncommand line.\n",
                        "long": "--no-signoff"
                    },
                    {
                        "name": "--stat, -n, --no-stat",
                        "content": "Show a diffstat at the end of the merge. The diffstat is also controlled by the\nconfiguration option merge.stat.\n\nWith -n or --no-stat do not show a diffstat at the end of the merge.\n",
                        "flag": "-n",
                        "long": "--no-stat"
                    },
                    {
                        "name": "--squash, --no-squash",
                        "content": "Produce the working tree and index state as if a real merge happened (except for the\nmerge information), but do not actually make a commit, move the HEAD, or record\n$GITDIR/MERGEHEAD (to cause the next git commit command to create a merge commit). This\nallows you to create a single commit on top of the current branch whose effect is the\nsame as merging another branch (or more in case of an octopus).\n\nWith --no-squash perform the merge and commit the result. This option can be used to\noverride --squash.\n\nWith --squash, --commit is not allowed, and will fail.\n\nOnly useful when merging.\n\n--[no-]verify\nBy default, the pre-merge and commit-msg hooks are run. When --no-verify is given, these\nare bypassed. See also githooks(5). Only useful when merging.\n\n-s <strategy>, --strategy=<strategy>\nUse the given merge strategy; can be supplied more than once to specify them in the order\nthey should be tried. If there is no -s option, a built-in list of strategies is used\ninstead (ort when merging a single head, octopus otherwise).\n\n-X <option>, --strategy-option=<option>\nPass merge strategy specific option through to the merge strategy.\n",
                        "long": "--no-squash"
                    },
                    {
                        "name": "--verify-signatures, --no-verify-signatures",
                        "content": "Verify that the tip commit of the side branch being merged is signed with a valid key,\ni.e. a key that has a valid uid: in the default trust model, this means the signing key\nhas been signed by a trusted key. If the tip commit of the side branch is not signed with\na valid key, the merge is aborted.\n\nOnly useful when merging.\n",
                        "long": "--no-verify-signatures"
                    },
                    {
                        "name": "--summary, --no-summary",
                        "content": "Synonyms to --stat and --no-stat; these are deprecated and will be removed in the future.\n",
                        "long": "--no-summary"
                    },
                    {
                        "name": "--autostash, --no-autostash",
                        "content": "Automatically create a temporary stash entry before the operation begins, record it in\nthe special ref MERGEAUTOSTASH and apply it after the operation ends. This means that\nyou can run the operation on a dirty worktree. However, use with care: the final stash\napplication after a successful merge might result in non-trivial conflicts.\n",
                        "long": "--no-autostash"
                    },
                    {
                        "name": "--allow-unrelated-histories",
                        "content": "By default, git merge command refuses to merge histories that do not share a common\nancestor. This option can be used to override this safety when merging histories of two\nprojects that started their lives independently. As that is a very rare occasion, no\nconfiguration variable to enable this by default exists and will not be added.\n\nOnly useful when merging.\n",
                        "long": "--allow-unrelated-histories"
                    },
                    {
                        "name": "-r, --rebase[=false|true|merges|interactive]",
                        "content": "When true, rebase the current branch on top of the upstream branch after fetching. If\nthere is a remote-tracking branch corresponding to the upstream branch and the upstream\nbranch was rebased since last fetched, the rebase uses that information to avoid rebasing\nnon-local changes.\n\nWhen set to merges, rebase using git rebase --rebase-merges so that the local merge\ncommits are included in the rebase (see git-rebase(1) for details).\n\nWhen false, merge the upstream branch into the current branch.\n\nWhen interactive, enable the interactive mode of rebase.\n\nSee pull.rebase, branch.<name>.rebase and branch.autoSetupRebase in git-config(1) if you\nwant to make git pull always use --rebase instead of merging.\n\nNote\nThis is a potentially dangerous mode of operation. It rewrites history, which does\nnot bode well when you published that history already. Do not use this option unless\nyou have read git-rebase(1) carefully.\n",
                        "flag": "-r"
                    },
                    {
                        "name": "--no-rebase",
                        "content": "This is shorthand for --rebase=false.\n",
                        "long": "--no-rebase"
                    },
                    {
                        "name": "Options related to fetching",
                        "content": ""
                    },
                    {
                        "name": "--all",
                        "content": "Fetch all remotes.\n",
                        "long": "--all"
                    },
                    {
                        "name": "-a, --append",
                        "content": "Append ref names and object names of fetched refs to the existing contents of\n.git/FETCHHEAD. Without this option old data in .git/FETCHHEAD will be overwritten.\n",
                        "flag": "-a",
                        "long": "--append"
                    },
                    {
                        "name": "--atomic",
                        "content": "Use an atomic transaction to update local refs. Either all refs are updated, or on error,\nno refs are updated.\n\n--depth=<depth>\nLimit fetching to the specified number of commits from the tip of each remote branch\nhistory. If fetching to a shallow repository created by git clone with --depth=<depth>\noption (see git-clone(1)), deepen or shorten the history to the specified number of\ncommits. Tags for the deepened commits are not fetched.\n\n--deepen=<depth>\nSimilar to --depth, except it specifies the number of commits from the current shallow\nboundary instead of from the tip of each remote branch history.\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": "--atomic"
                    },
                    {
                        "name": "--unshallow",
                        "content": "If the source repository is complete, convert a shallow repository to a complete one,\nremoving all the limitations imposed by shallow repositories.\n\nIf the source repository is shallow, fetch as much as possible so that the current\nrepository has the same history as the source repository.\n",
                        "long": "--unshallow"
                    },
                    {
                        "name": "--update-shallow",
                        "content": "By default when fetching from a shallow repository, git fetch refuses refs that require\nupdating .git/shallow. This option updates .git/shallow and accept such refs.\n\n--negotiation-tip=<commit|glob>\nBy default, Git will report, to the server, commits reachable from all local refs to find\ncommon commits in an attempt to reduce the size of the to-be-received packfile. If\nspecified, Git will only report commits reachable from the given tips. This is useful to\nspeed up fetches when the user knows which local ref is likely to have commits in common\nwith the upstream ref being fetched.\n\nThis option may be specified more than once; if so, Git will report commits reachable\nfrom any of the given commits.\n\nThe argument to this option may be a glob on ref names, a ref, or the (possibly\nabbreviated) SHA-1 of a commit. Specifying a glob is equivalent to specifying this option\nmultiple times, one for each matching ref name.\n\nSee also the fetch.negotiationAlgorithm and push.negotiate configuration variables\ndocumented in git-config(1), and the --negotiate-only option below.\n",
                        "long": "--update-shallow"
                    },
                    {
                        "name": "--negotiate-only",
                        "content": "Do not fetch anything from the server, and instead print the ancestors of the provided\n--negotiation-tip=* arguments, which we have in common with the server.\n\nInternally this is used to implement the push.negotiate option, see git-config(1).\n",
                        "long": "--negotiate-only"
                    },
                    {
                        "name": "--dry-run",
                        "content": "Show what would be done, without making any changes.\n",
                        "long": "--dry-run"
                    },
                    {
                        "name": "-f, --force",
                        "content": "When git fetch is used with <src>:<dst> refspec it may refuse to update the local branch\nas discussed in the <refspec> part of the git-fetch(1) documentation. This option\noverrides that check.\n",
                        "flag": "-f",
                        "long": "--force"
                    },
                    {
                        "name": "-k, --keep",
                        "content": "Keep downloaded pack.\n",
                        "flag": "-k",
                        "long": "--keep"
                    },
                    {
                        "name": "--prefetch",
                        "content": "Modify the configured refspec to place all refs into the refs/prefetch/ namespace. See\nthe prefetch task in git-maintenance(1).\n",
                        "long": "--prefetch"
                    },
                    {
                        "name": "-p, --prune",
                        "content": "Before fetching, remove any remote-tracking references that no longer exist on the\nremote. Tags are not subject to pruning if they are fetched only because of the default\ntag auto-following or due to a --tags option. However, if tags are fetched due to an\nexplicit refspec (either on the command line or in the remote configuration, for example\nif the remote was cloned with the --mirror option), then they are also subject to\npruning. Supplying --prune-tags is a shorthand for providing the tag refspec.\n",
                        "flag": "-p",
                        "long": "--prune"
                    },
                    {
                        "name": "--no-tags",
                        "content": "By default, tags that point at objects that are downloaded from the remote repository are\nfetched and stored locally. This option disables this automatic tag following. The\ndefault behavior for a remote may be specified with the remote.<name>.tagOpt setting. See\ngit-config(1).\n\n--refmap=<refspec>\nWhen fetching refs listed on the command line, use the specified refspec (can be given\nmore than once) to map the refs to remote-tracking branches, instead of the values of\nremote.*.fetch configuration variables for the remote repository. Providing an empty\n<refspec> to the --refmap option causes Git to ignore the configured refspecs and rely\nentirely on the refspecs supplied as command-line arguments. See section on \"Configured\nRemote-tracking Branches\" for details.\n",
                        "long": "--no-tags"
                    },
                    {
                        "name": "-t, --tags",
                        "content": "Fetch all tags from the remote (i.e., fetch remote tags refs/tags/* into local tags with\nthe same name), in addition to whatever else would otherwise be fetched. Using this\noption alone does not subject tags to pruning, even if --prune is used (though tags may\nbe pruned anyway if they are also the destination of an explicit refspec; see --prune).\n\n-j, --jobs=<n>\nNumber of parallel children to be used for all forms of fetching.\n\nIf the --multiple option was specified, the different remotes will be fetched in\nparallel. If multiple submodules are fetched, they will be fetched in parallel. To\ncontrol them independently, use the config settings fetch.parallel and\nsubmodule.fetchJobs (see git-config(1)).\n\nTypically, parallel recursive and multi-remote fetches will be faster. By default fetches\nare performed sequentially, not in parallel.\n",
                        "flag": "-t",
                        "long": "--tags"
                    },
                    {
                        "name": "--set-upstream",
                        "content": "If the remote is fetched successfully, add upstream (tracking) reference, used by\nargument-less git-pull(1) and other commands. For more information, see\nbranch.<name>.merge and branch.<name>.remote in git-config(1).\n",
                        "long": "--set-upstream"
                    },
                    {
                        "name": "--upload-pack <upload-pack>",
                        "content": "When given, and the repository to fetch from is handled by git fetch-pack,\n--exec=<upload-pack> is passed to the command to specify non-default path for the command\nrun on the other end.\n",
                        "long": "--upload-pack",
                        "arg": "<upload-pack>"
                    },
                    {
                        "name": "--progress",
                        "content": "Progress status is reported on the standard error stream by default when it is attached\nto a terminal, unless -q is specified. This flag forces progress status even if the\nstandard error stream is not directed to a terminal.\n\n-o <option>, --server-option=<option>\nTransmit the given string to the server when communicating using protocol version 2. The\ngiven string must not contain a NUL or LF character. The server’s handling of server\noptions, including unknown ones, is server-specific. When multiple\n--server-option=<option> are given, they are all sent to the other side in the order\nlisted on the command line.\n",
                        "long": "--progress"
                    },
                    {
                        "name": "--show-forced-updates",
                        "content": "By default, git checks if a branch is force-updated during fetch. This can be disabled\nthrough fetch.showForcedUpdates, but the --show-forced-updates option guarantees this\ncheck occurs. See git-config(1).\n",
                        "long": "--show-forced-updates"
                    },
                    {
                        "name": "--no-show-forced-updates",
                        "content": "By default, git checks if a branch is force-updated during fetch. Pass\n--no-show-forced-updates or set fetch.showForcedUpdates to false to skip this check for\nperformance reasons. If used during git-pull the --ff-only option will still check for\nforced updates before attempting a fast-forward update. See git-config(1).\n\n-4, --ipv4\nUse IPv4 addresses only, ignoring IPv6 addresses.\n\n-6, --ipv6\nUse IPv6 addresses only, ignoring IPv4 addresses.\n\n<repository>\nThe \"remote\" repository that is the source of a fetch or pull operation. This parameter\ncan be either a URL (see the section GIT URLS below) or the name of a remote (see the\nsection REMOTES below).\n\n<refspec>\nSpecifies which refs to fetch and which local refs to update. When no <refspec>s appear\non the command line, the refs to fetch are read from remote.<repository>.fetch variables\ninstead (see the section \"CONFIGURED REMOTE-TRACKING BRANCHES\" in git-fetch(1)).\n\nThe format of a <refspec> parameter is an optional plus +, followed by the source <src>,\nfollowed by a colon :, followed by the destination ref <dst>. The colon can be omitted\nwhen <dst> is empty. <src> is typically a ref, but it can also be a fully spelled hex\nobject name.\n\nA <refspec> may contain a * in its <src> to indicate a simple pattern match. Such a\nrefspec functions like a glob that matches any ref with the same prefix. A pattern\n<refspec> must have a * in both the <src> and <dst>. It will map refs to the destination\nby replacing the * with the contents matched from the source.\n\nIf a refspec is prefixed by ^, it will be interpreted as a negative refspec. Rather than\nspecifying which refs to fetch or which local refs to update, such a refspec will instead\nspecify refs to exclude. A ref will be considered to match if it matches at least one\npositive refspec, and does not match any negative refspec. Negative refspecs can be\nuseful to restrict the scope of a pattern refspec so that it will not include specific\nrefs. Negative refspecs can themselves be pattern refspecs. However, they may only\ncontain a <src> and do not specify a <dst>. Fully spelled out hex object names are also\nnot supported.\n\ntag <tag> means the same as refs/tags/<tag>:refs/tags/<tag>; it requests fetching\neverything up to the given tag.\n\nThe remote ref that matches <src> is fetched, and if <dst> is not an empty string, an\nattempt is made to update the local ref that matches it.\n\nWhether that update is allowed without --force depends on the ref namespace it’s being\nfetched to, the type of object being fetched, and whether the update is considered to be\na fast-forward. Generally, the same rules apply for fetching as when pushing, see the\n<refspec>...  section of git-push(1) for what those are. Exceptions to those rules\nparticular to git fetch are noted below.\n\nUntil Git version 2.20, and unlike when pushing with git-push(1), any updates to\nrefs/tags/* would be accepted without + in the refspec (or --force). When fetching, we\npromiscuously considered all tag updates from a remote to be forced fetches. Since Git\nversion 2.20, fetching to update refs/tags/* works the same way as when pushing. I.e. any\nupdates will be rejected without + in the refspec (or --force).\n\nUnlike when pushing with git-push(1), any updates outside of refs/{tags,heads}/* will be\naccepted without + in the refspec (or --force), whether that’s swapping e.g. a tree\nobject for a blob, or a commit for another commit that’s doesn’t have the previous commit\nas an ancestor etc.\n\nUnlike when pushing with git-push(1), there is no configuration which’ll amend these\nrules, and nothing like a pre-fetch hook analogous to the pre-receive hook.\n\nAs with pushing with git-push(1), all of the rules described above about what’s not\nallowed as an update can be overridden by adding an the optional leading + to a refspec\n(or using --force command line option). The only exception to this is that no amount of\nforcing will make the refs/heads/* namespace accept a non-commit object.\n\nNote\nWhen the remote branch you want to fetch is known to be rewound and rebased\nregularly, it is expected that its new tip will not be descendant of its previous tip\n(as stored in your remote-tracking branch the last time you fetched). You would want\nto use the + sign to indicate non-fast-forward updates will be needed for such\nbranches. There is no way to determine or declare that a branch will be made\navailable in a repository with this behavior; the pulling user simply must know this\nis the expected usage pattern for a branch.\n\nNote\nThere is a difference between listing multiple <refspec> directly on git pull command\nline and having multiple remote.<repository>.fetch entries in your configuration for\na <repository> and running a git pull command without any explicit <refspec>\nparameters. <refspec>s listed explicitly on the command line are always merged into\nthe current branch after fetching. In other words, if you list more than one remote\nref, git pull will create an Octopus merge. On the other hand, if you do not list any\nexplicit <refspec> parameter on the command line, git pull will fetch all the\n<refspec>s it finds in the remote.<repository>.fetch configuration and merge only the\nfirst <refspec> found into the current branch. This is because making an Octopus from\nremote refs is rarely done, while keeping track of multiple remote heads in one-go by\nfetching more than one is often useful.\n",
                        "long": "--no-show-forced-updates"
                    }
                ]
            },
            "GIT URLS": {
                "content": "In general, URLs contain information about the transport protocol, the address of the remote\nserver, and the path to the repository. Depending on the transport protocol, some of this\ninformation may be absent.\n\nGit supports ssh, git, http, and https protocols (in addition, ftp, and ftps can be used for\nfetching, but this is inefficient and deprecated; do not use it).\n\nThe native transport (i.e. git:// URL) does no authentication and should be used with caution\non unsecured networks.\n\nThe following syntaxes may be used with them:\n\n•   ssh://[user@]host.xz[:port]/path/to/repo.git/\n\n•   git://host.xz[:port]/path/to/repo.git/\n\n•   http[s]://host.xz[:port]/path/to/repo.git/\n\n•   ftp[s]://host.xz[:port]/path/to/repo.git/\n\nAn alternative scp-like syntax may also be used with the ssh protocol:\n\n•   [user@]host.xz:path/to/repo.git/\n\nThis syntax is only recognized if there are no slashes before the first colon. This helps\ndifferentiate a local path that contains a colon. For example the local path foo:bar could be\nspecified as an absolute path or ./foo:bar to avoid being misinterpreted as an ssh url.\n\nThe ssh and git protocols additionally support ~username expansion:\n\n•   ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/\n\n•   git://host.xz[:port]/~[user]/path/to/repo.git/\n\n•   [user@]host.xz:/~[user]/path/to/repo.git/\n\nFor local repositories, also supported by Git natively, the following syntaxes may be used:\n\n•   /path/to/repo.git/\n\n•   file:///path/to/repo.git/\n\nThese two syntaxes are mostly equivalent, except when cloning, when the former implies\n--local option. See git-clone(1) for details.\n\ngit clone, git fetch and git pull, but not git push, will also accept a suitable bundle file.\nSee git-bundle(1).\n\nWhen Git doesn’t know how to handle a certain transport protocol, it attempts to use the\nremote-<transport> remote helper, if one exists. To explicitly request a remote helper, the\nfollowing syntax may be used:\n\n•   <transport>::<address>\n\nwhere <address> may be a path, a server and path, or an arbitrary URL-like string recognized\nby the specific remote helper being invoked. See gitremote-helpers(7) for details.\n\nIf there are a large number of similarly-named remote repositories and you want to use a\ndifferent format for them (such that the URLs you use will be rewritten into URLs that work),\nyou can create a configuration section of the form:\n\n[url \"<actual url base>\"]\ninsteadOf = <other url base>\n\n\nFor example, with this:\n\n[url \"git://git.host.xz/\"]\ninsteadOf = host.xz:/path/to/\ninsteadOf = work:\n\n\na URL like \"work:repo.git\" or like \"host.xz:/path/to/repo.git\" will be rewritten in any\ncontext that takes a URL to be \"git://git.host.xz/repo.git\".\n\nIf you want to rewrite URLs for push only, you can create a configuration section of the\nform:\n\n[url \"<actual url base>\"]\npushInsteadOf = <other url base>\n\n\nFor example, with this:\n\n[url \"ssh://example.org/\"]\npushInsteadOf = git://example.org/\n\n\na URL like \"git://example.org/path/to/repo.git\" will be rewritten to\n\"ssh://example.org/path/to/repo.git\" for pushes, but pulls will still use the original URL.\n",
                "subsections": []
            },
            "REMOTES": {
                "content": "The name of one of the following can be used instead of a URL as <repository> argument:\n\n•   a remote in the Git configuration file: $GITDIR/config,\n\n•   a file in the $GITDIR/remotes directory, or\n\n•   a file in the $GITDIR/branches directory.\n\nAll of these also allow you to omit the refspec from the command line because they each\ncontain a refspec which git will use by default.\n",
                "subsections": [
                    {
                        "name": "Named remote in configuration file",
                        "content": "You can choose to provide the name of a remote which you had previously configured using git-\nremote(1), git-config(1) or even by a manual edit to the $GITDIR/config file. The URL of\nthis remote will be used to access the repository. The refspec of this remote will be used by\ndefault when you do not provide a refspec on the command line. The entry in the config file\nwould appear like this:\n\n[remote \"<name>\"]\nurl = <url>\npushurl = <pushurl>\npush = <refspec>\nfetch = <refspec>\n\n\nThe <pushurl> is used for pushes only. It is optional and defaults to <url>.\n\nNamed file in $GITDIR/remotes\nYou can choose to provide the name of a file in $GITDIR/remotes. The URL in this file will\nbe used to access the repository. The refspec in this file will be used as default when you\ndo not provide a refspec on the command line. This file should have the following format:\n\nURL: one of the above URL format\nPush: <refspec>\nPull: <refspec>\n\n\nPush: lines are used by git push and Pull: lines are used by git pull and git fetch. Multiple\nPush: and Pull: lines may be specified for additional branch mappings.\n\nNamed file in $GITDIR/branches\nYou can choose to provide the name of a file in $GITDIR/branches. The URL in this file will\nbe used to access the repository. This file should have the following format:\n\n<url>#<head>\n\n\n<url> is required; #<head> is optional.\n\nDepending on the operation, git will use one of the following refspecs, if you don’t provide\none on the command line. <branch> is the name of this file in $GITDIR/branches and <head>\ndefaults to master.\n\ngit fetch uses:\n\nrefs/heads/<head>:refs/heads/<branch>\n\n\ngit push uses:\n\nHEAD:refs/heads/<head>\n\n"
                    }
                ]
            },
            "MERGE STRATEGIES": {
                "content": "The merge mechanism (git merge and git pull commands) allows the backend merge strategies to\nbe chosen with -s option. Some strategies can also take their own options, which can be\npassed by giving -X<option> arguments to git merge and/or git pull.\n\nort\nThis is the default merge strategy when pulling or merging one branch. This strategy can\nonly resolve two heads using a 3-way merge algorithm. When there is more than one common\nancestor that can be used for 3-way merge, it creates a merged tree of the common\nancestors and uses that as the reference tree for the 3-way merge. This has been reported\nto result in fewer merge conflicts without causing mismerges by tests done on actual\nmerge commits taken from Linux 2.6 kernel development history. Additionally this strategy\ncan detect and handle merges involving renames. It does not make use of detected copies.\nThe name for this algorithm is an acronym (\"Ostensibly Recursive’s Twin\") and came from\nthe fact that it was written as a replacement for the previous default algorithm,\nrecursive.\n\nThe ort strategy can take the following options:\n\nours\nThis option forces conflicting hunks to be auto-resolved cleanly by favoring our\nversion. Changes from the other tree that do not conflict with our side are reflected\nin the merge result. For a binary file, the entire contents are taken from our side.\n\nThis should not be confused with the ours merge strategy, which does not even look at\nwhat the other tree contains at all. It discards everything the other tree did,\ndeclaring our history contains all that happened in it.\n\ntheirs\nThis is the opposite of ours; note that, unlike ours, there is no theirs merge\nstrategy to confuse this merge option with.\n\nignore-space-change, ignore-all-space, ignore-space-at-eol, ignore-cr-at-eol\nTreats lines with the indicated type of whitespace change as unchanged for the sake\nof a three-way merge. Whitespace changes mixed with other changes to a line are not\nignored. See also git-diff(1) -b, -w, --ignore-space-at-eol, and --ignore-cr-at-eol.\n\n•   If their version only introduces whitespace changes to a line, our version is\nused;\n\n•   If our version introduces whitespace changes but their version includes a\nsubstantial change, their version is used;\n\n•   Otherwise, the merge proceeds in the usual way.\n\nrenormalize\nThis runs a virtual check-out and check-in of all three stages of a file when\nresolving a three-way merge. This option is meant to be used when merging branches\nwith different clean filters or end-of-line normalization rules. See \"Merging\nbranches with differing checkin/checkout attributes\" in gitattributes(5) for details.\n\nno-renormalize\nDisables the renormalize option. This overrides the merge.renormalize configuration\nvariable.\n\nfind-renames[=<n>]\nTurn on rename detection, optionally setting the similarity threshold. This is the\ndefault. This overrides the merge.renames configuration variable. See also git-\ndiff(1) --find-renames.\n\nrename-threshold=<n>\nDeprecated synonym for find-renames=<n>.\n\nsubtree[=<path>]\nThis option is a more advanced form of subtree strategy, where the strategy makes a\nguess on how two trees must be shifted to match with each other when merging.\nInstead, the specified path is prefixed (or stripped from the beginning) to make the\nshape of two trees to match.\n\nrecursive\nThis can only resolve two heads using a 3-way merge algorithm. When there is more than\none common ancestor that can be used for 3-way merge, it creates a merged tree of the\ncommon ancestors and uses that as the reference tree for the 3-way merge. This has been\nreported to result in fewer merge conflicts without causing mismerges by tests done on\nactual merge commits taken from Linux 2.6 kernel development history. Additionally this\ncan detect and handle merges involving renames. It does not make use of detected copies.\nThis was the default strategy for resolving two heads from Git v0.99.9k until v2.33.0.\n\nThe recursive strategy takes the same options as ort. However, there are three additional\noptions that ort ignores (not documented above) that are potentially useful with the\nrecursive strategy:\n\npatience\nDeprecated synonym for diff-algorithm=patience.\n\ndiff-algorithm=[patience|minimal|histogram|myers]\nUse a different diff algorithm while merging, which can help avoid mismerges that\noccur due to unimportant matching lines (such as braces from distinct functions). See\nalso git-diff(1) --diff-algorithm. Note that ort specifically uses\ndiff-algorithm=histogram, while recursive defaults to the diff.algorithm config\nsetting.\n\nno-renames\nTurn off rename detection. This overrides the merge.renames configuration variable.\nSee also git-diff(1) --no-renames.\n\nresolve\nThis can only resolve two heads (i.e. the current branch and another branch you pulled\nfrom) using a 3-way merge algorithm. It tries to carefully detect criss-cross merge\nambiguities. It does not handle renames.\n\noctopus\nThis resolves cases with more than two heads, but refuses to do a complex merge that\nneeds manual resolution. It is primarily meant to be used for bundling topic branch heads\ntogether. This is the default merge strategy when pulling or merging more than one\nbranch.\n\nours\nThis resolves any number of heads, but the resulting tree of the merge is always that of\nthe current branch head, effectively ignoring all changes from all other branches. It is\nmeant to be used to supersede old development history of side branches. Note that this is\ndifferent from the -Xours option to the recursive merge strategy.\n\nsubtree\nThis is a modified ort strategy. When merging trees A and B, if B corresponds to a\nsubtree of A, B is first adjusted to match the tree structure of A, instead of reading\nthe trees at the same level. This adjustment is also done to the common ancestor tree.\n\nWith the strategies that use 3-way merge (including the default, ort), if a change is made on\nboth branches, but later reverted on one of the branches, that change will be present in the\nmerged result; some people find this behavior confusing. It occurs because only the heads and\nthe merge base are considered when performing a merge, not the individual commits. The merge\nalgorithm therefore considers the reverted change as no change at all, and substitutes the\nchanged version instead.\n",
                "subsections": []
            },
            "DEFAULT BEHAVIOUR": {
                "content": "Often people use git pull without giving any parameter. Traditionally, this has been\nequivalent to saying git pull origin. However, when configuration branch.<name>.remote is\npresent while on branch <name>, that value is used instead of origin.\n\nIn order to determine what URL to use to fetch from, the value of the configuration\nremote.<origin>.url is consulted and if there is not any such variable, the value on the URL:\nline in $GITDIR/remotes/<origin> is used.\n\nIn order to determine what remote branches to fetch (and optionally store in the\nremote-tracking branches) when the command is run without any refspec parameters on the\ncommand line, values of the configuration variable remote.<origin>.fetch are consulted, and\nif there aren’t any, $GITDIR/remotes/<origin> is consulted and its Pull: lines are used. In\naddition to the refspec formats described in the OPTIONS section, you can have a globbing\nrefspec that looks like this:\n\nrefs/heads/*:refs/remotes/origin/*\n\n\nA globbing refspec must have a non-empty RHS (i.e. must store what were fetched in\nremote-tracking branches), and its LHS and RHS must end with /*. The above specifies that all\nremote branches are tracked using remote-tracking branches in refs/remotes/origin/ hierarchy\nunder the same name.\n\nThe rule to determine which remote branch to merge after fetching is a bit involved, in order\nnot to break backward compatibility.\n\nIf explicit refspecs were given on the command line of git pull, they are all merged.\n\nWhen no refspec was given on the command line, then git pull uses the refspec from the\nconfiguration or $GITDIR/remotes/<origin>. In such cases, the following rules apply:\n\n1. If branch.<name>.merge configuration for the current branch <name> exists, that is the\nname of the branch at the remote site that is merged.\n\n2. If the refspec is a globbing one, nothing is merged.\n\n3. Otherwise the remote branch of the first refspec is merged.\n",
                "subsections": []
            },
            "EXAMPLES": {
                "content": "•   Update the remote-tracking branches for the repository you cloned from, then merge one of\nthem into your current branch:\n\n$ git pull\n$ git pull origin\n\nNormally the branch merged in is the HEAD of the remote repository, but the choice is\ndetermined by the branch.<name>.remote and branch.<name>.merge options; see git-config(1)\nfor details.\n\n•   Merge into the current branch the remote branch next:\n\n$ git pull origin next\n\nThis leaves a copy of next temporarily in FETCHHEAD, and updates the remote-tracking\nbranch origin/next. The same can be done by invoking fetch and merge:\n\n$ git fetch origin\n$ git merge origin/next\n\n\nIf you tried a pull which resulted in complex conflicts and would want to start over, you can\nrecover with git reset.\n",
                "subsections": []
            },
            "SECURITY": {
                "content": "The fetch and push protocols are not designed to prevent one side from stealing data from the\nother repository that was not intended to be shared. If you have private data that you need\nto protect from a malicious peer, your best option is to store it in another repository. This\napplies to both clients and servers. In particular, namespaces on a server are not effective\nfor read access control; you should only grant read access to a namespace to clients that you\nwould trust with read access to the entire repository.\n\nThe known attack vectors are as follows:\n\n1. The victim sends \"have\" lines advertising the IDs of objects it has that are not\nexplicitly intended to be shared but can be used to optimize the transfer if the peer\nalso has them. The attacker chooses an object ID X to steal and sends a ref to X, but\nisn’t required to send the content of X because the victim already has it. Now the victim\nbelieves that the attacker has X, and it sends the content of X back to the attacker\nlater. (This attack is most straightforward for a client to perform on a server, by\ncreating a ref to X in the namespace the client has access to and then fetching it. The\nmost likely way for a server to perform it on a client is to \"merge\" X into a public\nbranch and hope that the user does additional work on this branch and pushes it back to\nthe server without noticing the merge.)\n\n2. As in #1, the attacker chooses an object ID X to steal. The victim sends an object Y that\nthe attacker already has, and the attacker falsely claims to have X and not Y, so the\nvictim sends Y as a delta against X. The delta reveals regions of X that are similar to Y\nto the attacker.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Using --recurse-submodules can only fetch new commits in already checked out submodules right\nnow. When e.g. upstream added a new submodule in the just fetched commits of the superproject\nthe submodule itself cannot be fetched, making it impossible to check out that submodule\nlater without having to do a fetch again. This is expected to be fixed in a future Git\nversion.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "git-fetch(1), git-merge(1), git-config(1)\n",
                "subsections": []
            },
            "GIT": {
                "content": "Part of the git(1) suite\n\n\n\nGit 2.34.1                                   02/26/2026                                  GIT-PULL(1)",
                "subsections": []
            }
        }
    }
}