diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-03-10 15:02:36 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-03-10 15:02:36 -0800 |
commit | 53eec4d7df316d46d4de248964486ecfbcda0c99 (patch) | |
tree | ca3f2544626ab474fbdff9eea2020b373633b22e /git-submodule.html | |
parent | cbe0eb29622a497f18818e4481f27636446b86d7 (diff) | |
download | git-htmldocs-53eec4d7df316d46d4de248964486ecfbcda0c99.tar.gz |
Autogenerated HTML docs for v2.12.0-244-g62556
Diffstat (limited to 'git-submodule.html')
-rw-r--r-- | git-submodule.html | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/git-submodule.html b/git-submodule.html index 3a9b22563..c42d1d9d8 100644 --- a/git-submodule.html +++ b/git-submodule.html @@ -817,13 +817,16 @@ The <path> is also used as the submodule’s logical name in its configuration entries unless <code>--name</code> is used to specify a logical name.</p></div>
<div class="paragraph"><p><repository> is the URL of the new submodule’s origin repository.
This may be either an absolute URL, or (if it begins with ./
-or ../), the location relative to the superproject’s origin
+or ../), the location relative to the superproject’s default remote
repository (Please note that to specify a repository <em>foo.git</em>
which is located right next to a superproject <em>bar.git</em>, you’ll
have to use <em>../foo.git</em> instead of <em>./foo.git</em> - as one might expect
when following the rules for relative URLs - because the evaluation
-of relative URLs in Git is identical to that of relative directories).
-If the superproject doesn’t have an origin configured
+of relative URLs in Git is identical to that of relative directories).</p></div>
+<div class="paragraph"><p>The default remote is the remote of the remote tracking branch
+of the current branch. If no such remote tracking branch exists or
+the HEAD is detached, "origin" is assumed to be the default remote.
+If the superproject doesn’t have a default remote configured
the superproject is its own authoritative upstream and the current
working directory is used instead.</p></div>
<div class="paragraph"><p><path> is the relative location for the cloned submodule to
@@ -867,19 +870,22 @@ init [--] [<path>…] <dd>
<p>
Initialize the submodules recorded in the index (which were
- added and committed elsewhere) by copying submodule
- names and urls from .gitmodules to .git/config.
- Optional <path> arguments limit which submodules will be initialized.
- It will also copy the value of <code>submodule.$name.update</code> into
- .git/config.
- The key used in .git/config is <code>submodule.$name.url</code>.
- This command does not alter existing information in .git/config.
- You can then customize the submodule clone URLs in .git/config
- for your local setup and proceed to <code>git submodule update</code>;
- you can also just use <code>git submodule update --init</code> without
- the explicit <em>init</em> step if you do not intend to customize
- any submodule locations.
+ added and committed elsewhere) by setting <code>submodule.$name.url</code>
+ in .git/config. It uses the same setting from .gitmodules as
+ a template. If the URL is relative, it will be resolved using
+ the default remote. If there is no default remote, the current
+ repository will be assumed to be upstream.
</p>
+<div class="paragraph"><p>Optional <path> arguments limit which submodules will be initialized.
+If no path is specified, all submodules are initialized.</p></div>
+<div class="paragraph"><p>When present, it will also copy the value of <code>submodule.$name.update</code>.
+This command does not alter existing information in .git/config.
+You can then customize the submodule clone URLs in .git/config
+for your local setup and proceed to <code>git submodule update</code>;
+you can also just use <code>git submodule update --init</code> without
+the explicit <em>init</em> step if you do not intend to customize
+any submodule locations.</p></div>
+<div class="paragraph"><p>See the add subcommand for the defintion of default remote.</p></div>
</dd>
<dt class="hdlist1">
deinit [-f|--force] (--all|[--] <path>…)
@@ -1352,7 +1358,7 @@ for details.</p></div> <div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2017-02-15 15:17:51 PST
+Last updated 2017-03-10 15:02:29 PST
</div>
</div>
</body>
|