diff options
Diffstat (limited to 'Documentation/git-fetch.adoc')
| -rw-r--r-- | Documentation/git-fetch.adoc | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/Documentation/git-fetch.adoc b/Documentation/git-fetch.adoc index 16f5d9d69a..db03541915 100644 --- a/Documentation/git-fetch.adoc +++ b/Documentation/git-fetch.adoc @@ -8,11 +8,11 @@ git-fetch - Download objects and refs from another repository SYNOPSIS -------- -[verse] -'git fetch' [<options>] [<repository> [<refspec>...]] -'git fetch' [<options>] <group> -'git fetch' --multiple [<options>] [(<repository> | <group>)...] -'git fetch' --all [<options>] +[synopsis] +git fetch [<options>] [<repository> [<refspec>...]] +git fetch [<options>] <group> +git fetch --multiple [<options>] [(<repository>|<group>)...] +git fetch --all [<options>] DESCRIPTION @@ -20,19 +20,19 @@ DESCRIPTION Fetch branches and/or tags (collectively, "refs") from one or more other repositories, along with the objects necessary to complete their histories. Remote-tracking branches are updated (see the description -of <refspec> below for ways to control this behavior). +of _<refspec>_ below for ways to control this behavior). By default, any tag that points into the histories being fetched is also fetched; the effect is to fetch tags that point at branches that you are interested in. This default behavior -can be changed by using the --tags or --no-tags options or by -configuring remote.<name>.tagOpt. By using a refspec that fetches tags +can be changed by using the `--tags` or `--no-tags` options or by +configuring `remote.<name>.tagOpt`. By using a refspec that fetches tags explicitly, you can fetch tags that do not point into branches you are interested in as well. -'git fetch' can fetch from either a single named repository or URL, -or from several repositories at once if <group> is given and -there is a remotes.<group> entry in the configuration file. +`git fetch` can fetch from either a single named repository or URL, +or from several repositories at once if _<group>_ is given and +there is a `remotes.<group>` entry in the configuration file. (See linkgit:git-config[1]). When no remote is specified, by default the `origin` remote will be used, @@ -48,15 +48,15 @@ include::fetch-options.adoc[] include::pull-fetch-param.adoc[] ---stdin:: +`--stdin`:: Read refspecs, one per line, from stdin in addition to those provided - as arguments. The "tag <name>" format is not supported. + as arguments. The "tag _<name>_" format is not supported. include::urls-remotes.adoc[] - -CONFIGURED REMOTE-TRACKING BRANCHES[[CRTB]] -------------------------------------------- +[[CRTB]] +CONFIGURED REMOTE-TRACKING BRANCHES +----------------------------------- You often interact with the same remote repository by regularly and repeatedly fetching from it. In order to keep track @@ -84,13 +84,13 @@ This configuration is used in two ways: * When `git fetch` is run with explicit branches and/or tags to fetch on the command line, e.g. `git fetch origin master`, the - <refspec>s given on the command line determine what are to be + _<refspec>s_ given on the command line determine what are to be fetched (e.g. `master` in the example, which is a short-hand for `master:`, which in turn means - "fetch the 'master' branch but I do not explicitly say what + "fetch the `master` branch but I do not explicitly say what remote-tracking branch to update with it from the command line"), and the example command will - fetch _only_ the 'master' branch. The `remote.<repository>.fetch` + fetch _only_ the `master` branch. The `remote.<repository>.fetch` values determine which remote-tracking branch, if any, is updated. When used in this way, the `remote.<repository>.fetch` values do not have any @@ -144,9 +144,9 @@ tracking branches that are deleted, but any local tag that doesn't exist on the remote. This might not be what you expect, i.e. you want to prune remote -`<name>`, but also explicitly fetch tags from it, so when you fetch +_<name>_, but also explicitly fetch tags from it, so when you fetch from it you delete all your local tags, most of which may not have -come from the `<name>` remote in the first place. +come from the _<name>_ remote in the first place. So be careful when using this with a refspec like `refs/tags/*:refs/tags/*`, or any other refspec which might map @@ -213,11 +213,11 @@ of the form: <flag> <old-object-id> <new-object-id> <local-reference> ------------------------------- -The status of up-to-date refs is shown only if the --verbose option is +The status of up-to-date refs is shown only if the `--verbose` option is used. In compact output mode, specified with configuration variable -fetch.output, if either entire `<from>` or `<to>` is found in the +fetch.output, if either entire _<from>_ or _<to>_ is found in the other string, it will be substituted with `*` in the other string. For example, `master -> origin/master` becomes `master -> origin/*`. @@ -303,7 +303,7 @@ include::config/fetch.adoc[] BUGS ---- -Using --recurse-submodules can only fetch new commits in submodules that are +Using `--recurse-submodules` can only fetch new commits in submodules that are present locally e.g. in `$GIT_DIR/modules/`. If the upstream adds a new submodule, that submodule cannot be fetched until it is cloned e.g. by `git submodule update`. This is expected to be fixed in a future Git version. |
