summaryrefslogtreecommitdiffstats
path: root/gitsubmodules.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-10-05 15:21:55 -0700
committerJunio C Hamano <gitster@pobox.com>2020-10-05 15:21:55 -0700
commitd12815176f71c07e3844623f2c9c1ffc75a44574 (patch)
tree412c3124c3211cddd1af508e09b250dfe5755e77 /gitsubmodules.html
parent36ebb0e3ab4a7aa8b34196786a989cf6a523c648 (diff)
downloadgit-htmldocs-d12815176f71c07e3844623f2c9c1ffc75a44574.tar.gz
Autogenerated HTML docs for v2.29.0-rc0
Diffstat (limited to 'gitsubmodules.html')
-rw-r--r--gitsubmodules.html30
1 files changed, 19 insertions, 11 deletions
diff --git a/gitsubmodules.html b/gitsubmodules.html
index 2fa71dfc4..70dd427ea 100644
--- a/gitsubmodules.html
+++ b/gitsubmodules.html
@@ -1019,12 +1019,12 @@ presence of the .url field.</p></div>
<div class="sectionbody">
<div class="literalblock">
<div class="content">
-<pre><code># add a submodule
+<pre><code># Add a submodule
git submodule add &lt;url&gt; &lt;path&gt;</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><code># occasionally update the submodule to a new version:
+<pre><code># Occasionally update the submodule to a new version:
git -C &lt;path&gt; checkout &lt;new version&gt;
git add &lt;path&gt;
git commit -m "update submodule to new version"</code></pre>
@@ -1051,7 +1051,7 @@ git config --global submodule.recurse true</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><code># Unlike the other commands below clone still needs
+<pre><code># Unlike most other commands below, clone still needs
# its own recurse flag:
git clone --recurse &lt;URL&gt; &lt;directory&gt;
cd &lt;directory&gt;</code></pre>
@@ -1060,8 +1060,16 @@ cd &lt;directory&gt;</code></pre>
<div class="content">
<pre><code># Get to know the code:
git grep foo
-git ls-files</code></pre>
+git ls-files --recurse-submodules</code></pre>
</div></div>
+<div class="admonitionblock">
+<table><tr>
+<td class="icon">
+<div class="title">Note</div>
+</td>
+<td class="content"><code>git ls-files</code> also requires its own <code>--recurse-submodules</code> flag.</td>
+</tr></table>
+</div>
<div class="literalblock">
<div class="content">
<pre><code># Get new code
@@ -1070,7 +1078,7 @@ git pull --rebase</code></pre>
</div></div>
<div class="literalblock">
<div class="content">
-<pre><code># change worktree
+<pre><code># Change worktree
git checkout
git reset</code></pre>
</div></div>
@@ -1080,12 +1088,12 @@ git reset</code></pre>
<h2 id="_implementation_details">Implementation details</h2>
<div class="sectionbody">
<div class="paragraph"><p>When cloning or pulling a repository containing submodules the submodules
-will not be checked out by default; You can instruct <em>clone</em> to recurse
-into submodules. The <em>init</em> and <em>update</em> subcommands of <em>git submodule</em>
+will not be checked out by default; you can instruct <code>clone</code> to recurse
+into submodules. The <code>init</code> and <code>update</code> subcommands of <code>git submodule</code>
will maintain submodules checked out and at an appropriate revision in
-your working tree. Alternatively you can set <em>submodule.recurse</em> to have
-<em>checkout</em> recursing into submodules (note that <em>submodule.recurse</em> also
-affects other git commands, see <a href="git-config.html">git-config(1)</a> for a complete list).</p></div>
+your working tree. Alternatively you can set <code>submodule.recurse</code> to have
+<code>checkout</code> recursing into submodules (note that <code>submodule.recurse</code> also
+affects other Git commands, see <a href="git-config.html">git-config(1)</a> for a complete list).</p></div>
</div>
</div>
<div class="sect1">
@@ -1105,7 +1113,7 @@ affects other git commands, see <a href="git-config.html">git-config(1)</a> for
<div id="footer">
<div id="footer-text">
Last updated
- 2020-04-29 14:18:27 PDT
+ 2020-10-05 15:17:53 PDT
</div>
</div>
</body>