diff options
author | Junio C Hamano <gitster@pobox.com> | 2014-02-27 15:07:15 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-02-27 15:07:15 -0800 |
commit | 5b3533dc1d20a4946b19e379650c2faa5b88c9ec (patch) | |
tree | 3bc7b2357c9f22023f51c443d7d07fa87aa8fbf3 /git-submodule.html | |
parent | 616a76d3a7e606b4673a9657b203c03a152e7a63 (diff) | |
download | git-htmldocs-5b3533dc1d20a4946b19e379650c2faa5b88c9ec.tar.gz |
Autogenerated HTML docs for v1.9.0-138-g2de34
Diffstat (limited to 'git-submodule.html')
-rw-r--r-- | git-submodule.html | 45 |
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 [--] [<path>…]
<em>git submodule</em> [--quiet] deinit [-f|--force] [--] <path>…
<em>git submodule</em> [--quiet] update [--init] [--remote] [-N|--no-fetch]
- [-f|--force] [--rebase] [--reference <repository>] [--depth <depth>]
- [--merge] [--recursive] [--] [<path>…]
+ [-f|--force] [--rebase|--merge|--checkout] [--reference <repository>]
+ [--depth <depth>] [--recursive] [--] [<path>…]
<em>git submodule</em> [--quiet] summary [--cached|--files] [(-n|--summary-limit) <n>]
[commit] [--] [<path>…]
<em>git submodule</em> [--quiet] foreach [--recursive] <command>
@@ -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.<name>.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.<path>.branch</tt>.</p></div>
+<div class="paragraph"><p>For updates that do not clone missing submodules, the submodule’s HEAD
+is only touched when the remote reference does not match the
+submodule’s HEAD (for none-mode updates, the submodule is never
+touched). The remote reference is usually the gitlinked commit from
+the superproject’s tree, but with <tt>--remote</tt> it is the upstream
+subproject’s <tt>submodule.<name>.branch</tt>. This remote reference is
+integrated with the submodule’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’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.<name>.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’s remote repository before calculating the
SHA-1. If you don’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’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.<name>.branch</tt>, while <tt>git pull</tt> uses the submodule’s
+<tt>branch.<name>.merge</tt>. Prefer <tt>submodule.<name>.branch</tt> if you want
+to distribute the default upstream branch with the superproject and
+<tt>branch.<name>.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>
|