-u, \--update-head-ok::
By default `git-fetch` refuses to update the head which
corresponds to the current branch. This flag disables the
- check. Note that fetching into the current branch will not
- update the index and working directory, so use it with care.
+ check. This is purely for the internal use for `git-pull`
+ to communicate with `git-fetch`, and unless you are
+ implementing your own Porcelain you are not supposed to
+ use it.
+
+\--depth=<depth>::
+ Deepen the history of a 'shallow' repository created by
+ `git clone` with `--depth=<depth>` option (see gitlink:git-clone[1])
+ by the specified number of commits.
<div class="verseblock">\r
<div class="content"><em>git-clone</em> [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare]\r
[-o <name>] [-u <upload-pack>] [--reference <repository>]\r
- <repository> [<directory>]</div></div>\r
+ [--depth=<depth>] <repository> [<directory>]</div></div>\r
</div>\r
<h2>DESCRIPTION</h2>\r
<div class="sectionbody">\r
</p>\r
</dd>\r
<dt>\r
+--depth=<depth>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Create a <em>shallow</em> clone with a history truncated to the\r
+ specified number of revs. A shallow repository has\r
+ number of limitations (you cannot clone or fetch from\r
+ it, nor push from nor into it), but is adequate if you\r
+ want to only look at near the tip of a large project\r
+ with a long history, and would want to send in a fixes\r
+ as patches.\r
+</p>\r
+</dd>\r
+<dt>\r
<repository>\r
</dt>\r
<dd>\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 01-Jan-2007 03:20:13 UTC\r
+Last updated 02-Jan-2007 00:04:07 UTC\r
</div>\r
</div>\r
</body>\r
[verse]
'git-clone' [--template=<template_directory>] [-l [-s]] [-q] [-n] [--bare]
[-o <name>] [-u <upload-pack>] [--reference <repository>]
- <repository> [<directory>]
+ [--depth=<depth>] <repository> [<directory>]
DESCRIPTION
-----------
by initializing `remote.origin.url` and `remote.origin.fetch`
configuration variables.
+
OPTIONS
-------
--local::
if unset the templates are taken from the installation
defined default, typically `/usr/share/git-core/templates`.
+--depth=<depth>::
+ Create a 'shallow' clone with a history truncated to the
+ specified number of revs. A shallow repository has
+ number of limitations (you cannot clone or fetch from
+ it, nor push from nor into it), but is adequate if you
+ want to only look at near the tip of a large project
+ with a long history, and would want to send in a fixes
+ as patches.
+
<repository>::
The (possibly remote) repository to clone from. It can
be any URL git-fetch supports.
<p>\r
By default <tt>git-fetch</tt> refuses to update the head which\r
corresponds to the current branch. This flag disables the\r
- check. Note that fetching into the current branch will not\r
- update the index and working directory, so use it with care.\r
+ check. This is purely for the internal use for <tt>git-pull</tt>\r
+ to communicate with <tt>git-fetch</tt>, and unless you are\r
+ implementing your own Porcelain you are not supposed to\r
+ use it.\r
+</p>\r
+</dd>\r
+<dt>\r
+--depth=<depth>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Deepen the history of a <em>shallow</em> repository created by\r
+ <tt>git clone</tt> with <tt>--depth=<depth></tt> option (see <a href="git-clone.html">git-clone(1)</a>)\r
+ by the specified number of commits.\r
</p>\r
</dd>\r
<dt>\r
checkout -b my-B remote-B</tt>). Run <tt>git fetch</tt> to keep track of\r
the progress of the remote side, and when you see something new\r
on the remote branch, merge it into your development branch with\r
-<tt>git pull . remote-B</tt>, while you are on <tt>my-B</tt> branch.\r
-The common <tt>Pull: master:origin</tt> mapping of a remote <tt>master</tt>\r
-branch to a local <tt>origin</tt> branch, which is then merged to a\r
-local development branch, again typically named <tt>master</tt>, is made\r
-when you run <tt>git clone</tt> for you to follow this pattern.</td>\r
+<tt>git pull . remote-B</tt>, while you are on <tt>my-B</tt> branch.</td>\r
</tr></table>\r
</div>\r
<div class="admonitionblock">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 01-Jan-2007 03:20:13 UTC\r
+Last updated 02-Jan-2007 00:04:07 UTC\r
</div>\r
</div>\r
</body>\r
<p>\r
By default <tt>git-fetch</tt> refuses to update the head which\r
corresponds to the current branch. This flag disables the\r
- check. Note that fetching into the current branch will not\r
- update the index and working directory, so use it with care.\r
+ check. This is purely for the internal use for <tt>git-pull</tt>\r
+ to communicate with <tt>git-fetch</tt>, and unless you are\r
+ implementing your own Porcelain you are not supposed to\r
+ use it.\r
+</p>\r
+</dd>\r
+<dt>\r
+--depth=<depth>\r
+</dt>\r
+<dd>\r
+<p>\r
+ Deepen the history of a <em>shallow</em> repository created by\r
+ <tt>git clone</tt> with <tt>--depth=<depth></tt> option (see <a href="git-clone.html">git-clone(1)</a>)\r
+ by the specified number of commits.\r
</p>\r
</dd>\r
<dt>\r
checkout -b my-B remote-B</tt>). Run <tt>git fetch</tt> to keep track of\r
the progress of the remote side, and when you see something new\r
on the remote branch, merge it into your development branch with\r
-<tt>git pull . remote-B</tt>, while you are on <tt>my-B</tt> branch.\r
-The common <tt>Pull: master:origin</tt> mapping of a remote <tt>master</tt>\r
-branch to a local <tt>origin</tt> branch, which is then merged to a\r
-local development branch, again typically named <tt>master</tt>, is made\r
-when you run <tt>git clone</tt> for you to follow this pattern.</td>\r
+<tt>git pull . remote-B</tt>, while you are on <tt>my-B</tt> branch.</td>\r
</tr></table>\r
</div>\r
<div class="admonitionblock">\r
</dt>\r
<dd>\r
<p>\r
- Fetch the default head from the repository you cloned\r
- from and merge it into your current branch.\r
+ Update the remote-tracking branches for the repository\r
+ you cloned from, then merge one of them into your\r
+ current branch. Normally the branch merged in is\r
+ the HEAD of the remote repository, but the choice is\r
+ determined by the branch.<name>.remote and\r
+ branch.<name>.merge options; see <a href="git-repo-config.html">git-repo-config(1)</a>\r
+ for details.\r
</p>\r
</dd>\r
<dt>\r
-git pull -s ours . obsolete\r
+git pull origin next\r
</dt>\r
<dd>\r
<p>\r
- Merge local branch <tt>obsolete</tt> into the current branch,\r
- using <tt>ours</tt> merge strategy.\r
+ Merge into the current branch the remote branch <tt>next</tt>;\r
+ leaves a copy of <tt>next</tt> temporarily in FETCH_HEAD, but\r
+ does not update any remote-tracking branches.\r
</p>\r
</dd>\r
<dt>\r
</p>\r
</dd>\r
<dt>\r
+git pull -s ours . obsolete\r
+</dt>\r
+<dd>\r
+<p>\r
+ Merge local branch <tt>obsolete</tt> into the current branch,\r
+ using <tt>ours</tt> merge strategy.\r
+</p>\r
+</dd>\r
+<dt>\r
git pull --no-commit . maint\r
</dt>\r
<dd>\r
<dd>\r
<div class="listingblock">\r
<div class="content">\r
-<pre><tt>$ cat .git/remotes/origin\r
-URL: git://git.kernel.org/pub/scm/git/git.git\r
-Pull: master:origin\r
-\r
-$ git checkout master\r
-$ git fetch origin master:origin +pu:pu maint:maint\r
-$ git pull . origin</tt></pre>\r
-</div></div>\r
-<p>Here, a typical <tt>.git/remotes/origin</tt> file from a\r
-<tt>git-clone</tt> operation is used in combination with\r
-command line options to <tt>git-fetch</tt> to first update\r
-multiple branches of the local repository and then\r
-to merge the remote <tt>origin</tt> branch into the local\r
-<tt>master</tt> branch. The local <tt>pu</tt> branch is updated\r
-even if it does not result in a fast forward update.\r
-Here, the pull can obtain its objects from the local\r
-repository using <tt>.</tt>, as the previous <tt>git-fetch</tt> is\r
-known to have already obtained and made available\r
-all the necessary objects.</p>\r
-</dd>\r
-<dt>\r
-Pull of multiple branches from one repository using <tt>.git/remotes</tt> file\r
-</dt>\r
-<dd>\r
-<div class="listingblock">\r
-<div class="content">\r
-<pre><tt>$ cat .git/remotes/origin\r
-URL: git://git.kernel.org/pub/scm/git/git.git\r
-Pull: master:origin\r
-Pull: +pu:pu\r
-Pull: maint:maint\r
-\r
-$ git checkout master\r
-$ git pull origin</tt></pre>\r
+<pre><tt>$ git checkout master\r
+$ git fetch origin +pu:pu maint:tmp\r
+$ git pull . tmp</tt></pre>\r
</div></div>\r
-<p>Here, a typical <tt>.git/remotes/origin</tt> file from a\r
-<tt>git-clone</tt> operation has been hand-modified to include\r
-the branch-mapping of additional remote and local\r
-heads directly. A single <tt>git-pull</tt> operation while\r
-in the <tt>master</tt> branch will fetch multiple heads and\r
-merge the remote <tt>origin</tt> head into the current,\r
-local <tt>master</tt> branch.</p>\r
+<p>This updates (or creates, as necessary) branches <tt>pu</tt> and <tt>tmp</tt>\r
+in the local repository by fetching from the branches\r
+(respectively) <tt>pu</tt> and <tt>maint</tt> from the remote repository.</p>\r
+<p>The <tt>pu</tt> branch will be updated even if it is does not\r
+fast-forward; the others will not be.</p>\r
+<p>The final command then merges the newly fetched <tt>tmp</tt> into master.</p>\r
</dd>\r
</dl>\r
<p>If you tried a pull which resulted in a complex conflicts and\r
</div>\r
<h2>SEE ALSO</h2>\r
<div class="sectionbody">\r
-<p><a href="git-fetch.html">git-fetch(1)</a>, <a href="git-merge.html">git-merge(1)</a></p>\r
+<p><a href="git-fetch.html">git-fetch(1)</a>, <a href="git-merge.html">git-merge(1)</a>, <a href="git-repo-config.html">git-repo-config(1)</a></p>\r
</div>\r
<h2>Author</h2>\r
<div class="sectionbody">\r
</div>\r
<div id="footer">\r
<div id="footer-text">\r
-Last updated 01-Jan-2007 03:20:14 UTC\r
+Last updated 02-Jan-2007 00:04:08 UTC\r
</div>\r
</div>\r
</body>\r
--------
git pull, git pull origin::
- Fetch the default head from the repository you cloned
- from and merge it into your current branch.
-
-git pull -s ours . obsolete::
- Merge local branch `obsolete` into the current branch,
- using `ours` merge strategy.
+ Update the remote-tracking branches for the repository
+ you cloned from, then merge one of them into your
+ current branch. 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 gitlink:git-repo-config[1]
+ for details.
+
+git pull origin next::
+ Merge into the current branch the remote branch `next`;
+ leaves a copy of `next` temporarily in FETCH_HEAD, but
+ does not update any remote-tracking branches.
git pull . fixes enhancements::
Bundle local branch `fixes` and `enhancements` on top of
the current branch, making an Octopus merge.
+git pull -s ours . obsolete::
+ Merge local branch `obsolete` into the current branch,
+ using `ours` merge strategy.
+
git pull --no-commit . maint::
Merge local branch `maint` into the current branch, but
do not make a commit automatically. This can be used
Command line pull of multiple branches from one repository::
+
------------------------------------------------
-$ cat .git/remotes/origin
-URL: git://git.kernel.org/pub/scm/git/git.git
-Pull: master:origin
-
$ git checkout master
-$ git fetch origin master:origin +pu:pu maint:maint
-$ git pull . origin
+$ git fetch origin +pu:pu maint:tmp
+$ git pull . tmp
------------------------------------------------
+
-Here, a typical `.git/remotes/origin` file from a
-`git-clone` operation is used in combination with
-command line options to `git-fetch` to first update
-multiple branches of the local repository and then
-to merge the remote `origin` branch into the local
-`master` branch. The local `pu` branch is updated
-even if it does not result in a fast forward update.
-Here, the pull can obtain its objects from the local
-repository using `.`, as the previous `git-fetch` is
-known to have already obtained and made available
-all the necessary objects.
-
-
-Pull of multiple branches from one repository using `.git/remotes` file::
+This updates (or creates, as necessary) branches `pu` and `tmp`
+in the local repository by fetching from the branches
+(respectively) `pu` and `maint` from the remote repository.
+
-------------------------------------------------
-$ cat .git/remotes/origin
-URL: git://git.kernel.org/pub/scm/git/git.git
-Pull: master:origin
-Pull: +pu:pu
-Pull: maint:maint
-
-$ git checkout master
-$ git pull origin
-------------------------------------------------
+The `pu` branch will be updated even if it is does not
+fast-forward; the others will not be.
+
-Here, a typical `.git/remotes/origin` file from a
-`git-clone` operation has been hand-modified to include
-the branch-mapping of additional remote and local
-heads directly. A single `git-pull` operation while
-in the `master` branch will fetch multiple heads and
-merge the remote `origin` head into the current,
-local `master` branch.
+The final command then merges the newly fetched `tmp` into master.
If you tried a pull which resulted in a complex conflicts and
SEE ALSO
--------
-gitlink:git-fetch[1], gitlink:git-merge[1]
+gitlink:git-fetch[1], gitlink:git-merge[1], gitlink:git-repo-config[1]
Author
the progress of the remote side, and when you see something new
on the remote branch, merge it into your development branch with
`git pull . remote-B`, while you are on `my-B` branch.
-The common `Pull: master:origin` mapping of a remote `master`
-branch to a local `origin` branch, which is then merged to a
-local development branch, again typically named `master`, is made
-when you run `git clone` for you to follow this pattern.
+
[NOTE]
There is a difference between listing multiple <refspec>