summaryrefslogtreecommitdiffstats
path: root/git-submodule.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-02-27 15:07:15 -0800
committerJunio C Hamano <gitster@pobox.com>2014-02-27 15:07:15 -0800
commit5b3533dc1d20a4946b19e379650c2faa5b88c9ec (patch)
tree3bc7b2357c9f22023f51c443d7d07fa87aa8fbf3 /git-submodule.html
parent616a76d3a7e606b4673a9657b203c03a152e7a63 (diff)
downloadgit-htmldocs-5b3533dc1d20a4946b19e379650c2faa5b88c9ec.tar.gz
Autogenerated HTML docs for v1.9.0-138-g2de34
Diffstat (limited to 'git-submodule.html')
-rw-r--r--git-submodule.html45
1 files changed, 35 insertions, 10 deletions
diff --git a/git-submodule.html b/git-submodule.html
index 2791a45ac..fadee5dd8 100644
--- a/git-submodule.html
+++ b/git-submodule.html
@@ -756,8 +756,8 @@ git-submodule(1) Manual Page
<em>git submodule</em> [--quiet] init [--] [&lt;path&gt;&#8230;]
<em>git submodule</em> [--quiet] deinit [-f|--force] [--] &lt;path&gt;&#8230;
<em>git submodule</em> [--quiet] update [--init] [--remote] [-N|--no-fetch]
- [-f|--force] [--rebase] [--reference &lt;repository&gt;] [--depth &lt;depth&gt;]
- [--merge] [--recursive] [--] [&lt;path&gt;&#8230;]
+ [-f|--force] [--rebase|--merge|--checkout] [--reference &lt;repository&gt;]
+ [--depth &lt;depth&gt;] [--recursive] [--] [&lt;path&gt;&#8230;]
<em>git submodule</em> [--quiet] summary [--cached|--files] [(-n|--summary-limit) &lt;n&gt;]
[commit] [--] [&lt;path&gt;&#8230;]
<em>git submodule</em> [--quiet] foreach [--recursive] &lt;command&gt;
@@ -915,14 +915,30 @@ update
<dd>
<p>
Update the registered submodules, i.e. clone missing submodules and
- checkout the commit specified in the index of the containing repository.
- This will make the submodules HEAD be detached unless <tt>--rebase</tt> or
- <tt>--merge</tt> is specified or the key <tt>submodule.$name.update</tt> is set to
- <tt>rebase</tt>, <tt>merge</tt> or <tt>none</tt>. <tt>none</tt> can be overridden by specifying
- <tt>--checkout</tt>. Setting the key <tt>submodule.$name.update</tt> to <tt>!command</tt>
- will cause <tt>command</tt> to be run. <tt>command</tt> can be any arbitrary shell
- command that takes a single argument, namely the sha1 to update to.
+ checkout the commit specified in the index of the containing
+ repository. The update mode defaults to <tt>checkout</tt>, but can be
+ configured with the <tt>submodule.&lt;name&gt;.update</tt> setting or the
+ <tt>--rebase</tt>, <tt>--merge</tt>, or <tt>--checkout</tt> options.
</p>
+<div class="paragraph"><p>For updates that clone missing submodules, checkout-mode updates will
+create submodules with detached HEADs; all other modes will create
+submodules with a local branch named after <tt>submodule.&lt;path&gt;.branch</tt>.</p></div>
+<div class="paragraph"><p>For updates that do not clone missing submodules, the submodule&#8217;s HEAD
+is only touched when the remote reference does not match the
+submodule&#8217;s HEAD (for none-mode updates, the submodule is never
+touched). The remote reference is usually the gitlinked commit from
+the superproject&#8217;s tree, but with <tt>--remote</tt> it is the upstream
+subproject&#8217;s <tt>submodule.&lt;name&gt;.branch</tt>. This remote reference is
+integrated with the submodule&#8217;s HEAD using the specified update mode.
+For checkout-mode updates, that will result in a detached HEAD. For
+rebase- and merge-mode updates, the commit referenced by the
+submodule&#8217;s HEAD may change, but the symbolic reference will remain
+unchanged (i.e. checked-out branches will still be checked-out
+branches, and detached HEADs will still be detached HEADs). If none
+of the builtin modes fit your needs, set <tt>submodule.&lt;name&gt;.update</tt> to
+<tt>!command</tt> to configure a custom integration command. <tt>command</tt> can
+be any arbitrary shell command that takes a single argument, namely
+the sha1 to update to.</p></div>
<div class="paragraph"><p>If the submodule is not yet initialized, and you just want to use the
setting as stored in .gitmodules, you can automatically initialize the
submodule with the <tt>--init</tt> option.</p></div>
@@ -1097,6 +1113,15 @@ submodule changes into the submodules, while <tt>submodule update
fetches the submodule&#8217;s remote repository before calculating the
SHA-1. If you don&#8217;t want to fetch, you should use <tt>submodule update
--remote --no-fetch</tt>.</p></div>
+<div class="paragraph"><p>Use this option to integrate changes from the upstream subproject with
+your submodule&#8217;s current HEAD. Alternatively, you can run <tt>git pull</tt>
+from the submodule, which is equivalent except for the remote branch
+name: <tt>update --remote</tt> uses the default upstream repository and
+<tt>submodule.&lt;name&gt;.branch</tt>, while <tt>git pull</tt> uses the submodule&#8217;s
+<tt>branch.&lt;name&gt;.merge</tt>. Prefer <tt>submodule.&lt;name&gt;.branch</tt> if you want
+to distribute the default upstream branch with the superproject and
+<tt>branch.&lt;name&gt;.merge</tt> if you want a more native feel while working in
+the submodule itself.</p></div>
</dd>
<dt class="hdlist1">
-N
@@ -1225,7 +1250,7 @@ for details.</p></div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2013-08-20 08:40:27 PDT
+Last updated 2014-02-27 15:06:29 PST
</div>
</div>
</body>