summaryrefslogtreecommitdiffstats
path: root/git-submodule.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
committerJunio C Hamano <gitster@pobox.com>2014-10-31 13:25:53 -0700
commitc14e6ad9a230ad90c84b7f620d87fbe49a2d0342 (patch)
tree120346dc383e3d1c4219fe8c533eb22cb6af2b55 /git-submodule.html
parent2a4bcbc355496c8d83b1b9f8892c4cbe8f584158 (diff)
downloadgit-htmldocs-c14e6ad9a230ad90c84b7f620d87fbe49a2d0342.tar.gz
Autogenerated HTML docs for v2.2.0-rc0
Diffstat (limited to 'git-submodule.html')
-rw-r--r--git-submodule.html154
1 files changed, 76 insertions, 78 deletions
diff --git a/git-submodule.html b/git-submodule.html
index 95852713b..a6cf95ab9 100644
--- a/git-submodule.html
+++ b/git-submodule.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 8.6.6" />
+<meta name="generator" content="AsciiDoc 8.6.9" />
<title>git-submodule(1)</title>
<style type="text/css">
/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
@@ -87,10 +87,16 @@ ul, ol, li > p {
ul > li { color: #aaa; }
ul > li > * { color: black; }
-pre {
+.monospaced, code, pre {
+ font-family: "Courier New", Courier, monospace;
+ font-size: inherit;
+ color: navy;
padding: 0;
margin: 0;
}
+pre {
+ white-space: pre-wrap;
+}
#author {
color: #527bbd;
@@ -219,7 +225,7 @@ div.exampleblock > div.content {
}
div.imageblock div.content { padding-left: 0; }
-span.image img { border-style: none; }
+span.image img { border-style: none; vertical-align: text-bottom; }
a.image:visited { color: white; }
dl {
@@ -349,7 +355,7 @@ div.colist td img {
margin-bottom: 0.1em;
}
-div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -407,18 +413,14 @@ span.underline { text-decoration: underline; }
span.overline { text-decoration: overline; }
span.line-through { text-decoration: line-through; }
+div.unbreakable { page-break-inside: avoid; }
+
/*
* xhtml11 specific
*
* */
-tt {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
div.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -452,12 +454,6 @@ div.tableblock > table[frame="vsides"] {
*
* */
-.monospaced {
- font-family: monospace;
- font-size: inherit;
- color: navy;
-}
-
table.tableblock {
margin-top: 1.0em;
margin-bottom: 1.5em;
@@ -537,6 +533,8 @@ body.manpage div.sectionbody {
@media print {
body.manpage div#toc { display: none; }
}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
@@ -581,7 +579,7 @@ toc: function (toclevels) {
function tocEntries(el, toclevels) {
var result = new Array;
- var re = new RegExp('[hH]([2-'+(toclevels+1)+'])');
+ var re = new RegExp('[hH]([1-'+(toclevels+1)+'])');
// Function that scans the DOM tree for header elements (the DOM2
// nodeIterator API would be a better technique but not supported by all
// browsers).
@@ -610,7 +608,7 @@ toc: function (toclevels) {
var i;
for (i = 0; i < toc.childNodes.length; i++) {
var entry = toc.childNodes[i];
- if (entry.nodeName == 'div'
+ if (entry.nodeName.toLowerCase() == 'div'
&& entry.getAttribute("class")
&& entry.getAttribute("class").match(/^toclevel/))
tocEntriesToRemove.push(entry);
@@ -656,7 +654,7 @@ footnotes: function () {
var entriesToRemove = [];
for (i = 0; i < noteholder.childNodes.length; i++) {
var entry = noteholder.childNodes[i];
- if (entry.nodeName == 'div' && entry.getAttribute("class") == "footnote")
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
entriesToRemove.push(entry);
}
for (i = 0; i < entriesToRemove.length; i++) {
@@ -784,10 +782,10 @@ add a remote for the other project and use the <em>subtree</em> merge strategy,
instead of treating the other project as a submodule. Directories
that come from both projects can be cloned and checked out as a whole
if you choose to go that route.</p></div>
-<div class="paragraph"><p>Submodules are composed from a so-called <tt>gitlink</tt> tree entry
+<div class="paragraph"><p>Submodules are composed from a so-called <code>gitlink</code> tree entry
in the main repository that refers to a particular commit object
within the inner repository that is completely separate.
-A record in the <tt>.gitmodules</tt> (see <a href="gitmodules.html">gitmodules(5)</a>) file at the
+A record in the <code>.gitmodules</code> (see <a href="gitmodules.html">gitmodules(5)</a>) file at the
root of the source tree assigns a logical name to the submodule and
describes the default URL the submodule shall be cloned from.
The logical name can be used for overriding this URL within your
@@ -825,7 +823,7 @@ to exist in the superproject. If &lt;path&gt; is not given, the
"humanish" part of the source repository is used ("repo" for
"/path/to/repo.git" and "foo" for "host.xz:foo/.git").
The &lt;path&gt; is also used as the submodule&#8217;s logical name in its
-configuration entries unless <tt>--name</tt> is used to specify a logical name.</p></div>
+configuration entries unless <code>--name</code> is used to specify a logical name.</p></div>
<div class="paragraph"><p>&lt;repository&gt; is the URL of the new submodule&#8217;s origin repository.
This may be either an absolute URL, or (if it begins with ./
or ../), the location relative to the superproject&#8217;s origin
@@ -860,12 +858,12 @@ status
Show the status of the submodules. This will print the SHA-1 of the
currently checked out commit for each submodule, along with the
submodule path and the output of <em>git describe</em> for the
- SHA-1. Each SHA-1 will be prefixed with <tt>-</tt> if the submodule is not
- initialized, <tt>+</tt> if the currently checked out submodule commit
+ SHA-1. Each SHA-1 will be prefixed with <code>-</code> if the submodule is not
+ initialized, <code>+</code> if the currently checked out submodule commit
does not match the SHA-1 found in the index of the containing
- repository and <tt>U</tt> if the submodule has merge conflicts.
+ repository and <code>U</code> if the submodule has merge conflicts.
</p>
-<div class="paragraph"><p>If <tt>--recursive</tt> is specified, this command will recurse into nested
+<div class="paragraph"><p>If <code>--recursive</code> is specified, this command will recurse into nested
submodules, and show their status as well.</p></div>
<div class="paragraph"><p>If you are only interested in changes of the currently initialized
submodules with respect to the commit recorded in the index or the HEAD,
@@ -881,13 +879,13 @@ init
added and committed elsewhere) by copying submodule
names and urls from .gitmodules to .git/config.
Optional &lt;path&gt; arguments limit which submodules will be initialized.
- It will also copy the value of <tt>submodule.$name.update</tt> into
+ It will also copy the value of <code>submodule.$name.update</code> into
.git/config.
- The key used in .git/config is <tt>submodule.$name.url</tt>.
+ 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 <tt>git submodule update</tt>;
- you can also just use <tt>git submodule update --init</tt> without
+ 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>
@@ -898,15 +896,15 @@ deinit
<dd>
<p>
Unregister the given submodules, i.e. remove the whole
- <tt>submodule.$name</tt> section from .git/config together with their work
- tree. Further calls to <tt>git submodule update</tt>, <tt>git submodule foreach</tt>
- and <tt>git submodule sync</tt> will skip any unregistered submodules until
+ <code>submodule.$name</code> section from .git/config together with their work
+ tree. Further calls to <code>git submodule update</code>, <code>git submodule foreach</code>
+ and <code>git submodule sync</code> will skip any unregistered submodules until
they are initialized again, so use this command if you don&#8217;t want to
have a local checkout of the submodule in your work tree anymore. If
you really want to remove a submodule from the repository and commit
that use <a href="git-rm.html">git-rm(1)</a> instead.
</p>
-<div class="paragraph"><p>If <tt>--force</tt> is specified, the submodule&#8217;s work tree will be removed even if
+<div class="paragraph"><p>If <code>--force</code> is specified, the submodule&#8217;s work tree will be removed even if
it contains local modifications.</p></div>
</dd>
<dt class="hdlist1">
@@ -916,20 +914,20 @@ update
<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
+ This will make the submodules HEAD be detached unless <code>--rebase</code> or
+ <code>--merge</code> is specified or the key <code>submodule.$name.update</code> is set to
+ <code>rebase</code>, <code>merge</code> or <code>none</code>. <code>none</code> can be overridden by specifying
+ <code>--checkout</code>. Setting the key <code>submodule.$name.update</code> to <code>!command</code>
+ will cause <code>command</code> to be run. <code>command</code> can be any arbitrary shell
command that takes a single argument, namely the sha1 to update to.
</p>
<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>
-<div class="paragraph"><p>If <tt>--recursive</tt> is specified, this command will recurse into the
+submodule with the <code>--init</code> option.</p></div>
+<div class="paragraph"><p>If <code>--recursive</code> is specified, this command will recurse into the
registered submodules, and update any nested submodules within.</p></div>
-<div class="paragraph"><p>If <tt>--force</tt> is specified, the submodule will be checked out (using
-<tt>git checkout --force</tt> if appropriate), even if the commit specified in the
+<div class="paragraph"><p>If <code>--force</code> is specified, the submodule will be checked out (using
+<code>git checkout --force</code> if appropriate), even if the commit specified in the
index of the containing repository already matches the commit checked out in
the submodule.</p></div>
</dd>
@@ -941,13 +939,13 @@ summary
Show commit summary between the given commit (defaults to HEAD) and
working tree/index. For a submodule in question, a series of commits
in the submodule between the given super project commit and the
- index or working tree (switched by <tt>--cached</tt>) are shown. If the option
- <tt>--files</tt> is given, show the series of commits in the submodule between
+ index or working tree (switched by <code>--cached</code>) are shown. If the option
+ <code>--files</code> is given, show the series of commits in the submodule between
the index of the super project and the working tree of the submodule
- (this option doesn&#8217;t allow to use the <tt>--cached</tt> option or to provide an
+ (this option doesn&#8217;t allow to use the <code>--cached</code> option or to provide an
explicit commit).
</p>
-<div class="paragraph"><p>Using the <tt>--submodule=log</tt> option with <a href="git-diff.html">git-diff(1)</a> will provide that
+<div class="paragraph"><p>Using the <code>--submodule=log</code> option with <a href="git-diff.html">git-diff(1)</a> will provide that
information too.</p></div>
</dd>
<dt class="hdlist1">
@@ -963,16 +961,16 @@ foreach
superproject, $sha1 is the commit as recorded in the superproject,
and $toplevel is the absolute path to the top-level of the superproject.
Any submodules defined in the superproject but not checked out are
- ignored by this command. Unless given <tt>--quiet</tt>, foreach prints the name
+ ignored by this command. Unless given <code>--quiet</code>, foreach prints the name
of each submodule before evaluating the command.
- If <tt>--recursive</tt> is given, submodules are traversed recursively (i.e.
+ If <code>--recursive</code> is given, submodules are traversed recursively (i.e.
the given shell command is evaluated in nested submodules as well).
A non-zero return from the command in any submodule causes
the processing to terminate. This can be overridden by adding <em>|| :</em>
to the end of the command.
</p>
-<div class="paragraph"><p>As an example, <tt>git submodule foreach 'echo $path &#96;git
-rev-parse HEAD&#96;'</tt> will show the path and currently checked out
+<div class="paragraph"><p>As an example, <code>git submodule foreach 'echo $path &#96;git
+rev-parse HEAD&#96;'</code> will show the path and currently checked out
commit for each submodule.</p></div>
</dd>
<dt class="hdlist1">
@@ -1017,8 +1015,8 @@ sync
<dd>
<p>
Branch of repository to add as submodule.
- The name of the branch is recorded as <tt>submodule.&lt;name&gt;.branch</tt> in
- <tt>.gitmodules</tt> for <tt>update --remote</tt>.
+ The name of the branch is recorded as <code>submodule.&lt;name&gt;.branch</code> in
+ <code>.gitmodules</code> for <code>update --remote</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1082,29 +1080,29 @@ sync
This option is only valid for the update command. Instead of using
the superproject&#8217;s recorded SHA-1 to update the submodule, use the
status of the submodule&#8217;s remote-tracking branch. The remote used
- is branch&#8217;s remote (<tt>branch.&lt;name&gt;.remote</tt>), defaulting to <tt>origin</tt>.
- The remote branch used defaults to <tt>master</tt>, but the branch name may
- be overridden by setting the <tt>submodule.&lt;name&gt;.branch</tt> option in
- either <tt>.gitmodules</tt> or <tt>.git/config</tt> (with <tt>.git/config</tt> taking
+ is branch&#8217;s remote (<code>branch.&lt;name&gt;.remote</code>), defaulting to <code>origin</code>.
+ The remote branch used defaults to <code>master</code>, but the branch name may
+ be overridden by setting the <code>submodule.&lt;name&gt;.branch</code> option in
+ either <code>.gitmodules</code> or <code>.git/config</code> (with <code>.git/config</code> taking
precedence).
</p>
-<div class="paragraph"><p>This works for any of the supported update procedures (<tt>--checkout</tt>,
-<tt>--rebase</tt>, etc.). The only change is the source of the target SHA-1.
-For example, <tt>submodule update --remote --merge</tt> will merge upstream
-submodule changes into the submodules, while <tt>submodule update
---merge</tt> will merge superproject gitlink changes into the submodules.</p></div>
-<div class="paragraph"><p>In order to ensure a current tracking branch state, <tt>update --remote</tt>
+<div class="paragraph"><p>This works for any of the supported update procedures (<code>--checkout</code>,
+<code>--rebase</code>, etc.). The only change is the source of the target SHA-1.
+For example, <code>submodule update --remote --merge</code> will merge upstream
+submodule changes into the submodules, while <code>submodule update
+--merge</code> will merge superproject gitlink changes into the submodules.</p></div>
+<div class="paragraph"><p>In order to ensure a current tracking branch state, <code>update --remote</code>
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>
+SHA-1. If you don&#8217;t want to fetch, you should use <code>submodule update
+--remote --no-fetch</code>.</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>
+your submodule&#8217;s current HEAD. Alternatively, you can run <code>git pull</code>
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
+name: <code>update --remote</code> uses the default upstream repository and
+<code>submodule.&lt;name&gt;.branch</code>, while <code>git pull</code> uses the submodule&#8217;s
+<code>branch.&lt;name&gt;.merge</code>. Prefer <code>submodule.&lt;name&gt;.branch</code> 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
+<code>branch.&lt;name&gt;.merge</code> if you want a more native feel while working in
the submodule itself.</p></div>
</dd>
<dt class="hdlist1">
@@ -1127,10 +1125,10 @@ the submodule itself.</p></div>
This option is only valid for the update command.
Checkout the commit recorded in the superproject on a detached HEAD
in the submodule. This is the default behavior, the main use of
- this option is to override <tt>submodule.$name.update</tt> when set to
- <tt>merge</tt>, <tt>rebase</tt> or <tt>none</tt>.
- If the key <tt>submodule.$name.update</tt> is either not explicitly set or
- set to <tt>checkout</tt>, this option is implicit.
+ this option is to override <code>submodule.$name.update</code> when set to
+ <code>merge</code>, <code>rebase</code> or <code>none</code>.
+ If the key <code>submodule.$name.update</code> is either not explicitly set or
+ set to <code>checkout</code>, this option is implicit.
</p>
</dd>
<dt class="hdlist1">
@@ -1144,7 +1142,7 @@ the submodule itself.</p></div>
not be detached. If a merge failure prevents this process, you will
have to resolve the resulting conflicts within the submodule with the
usual conflict resolution tools.
- If the key <tt>submodule.$name.update</tt> is set to <tt>merge</tt>, this option is
+ If the key <code>submodule.$name.update</code> is set to <code>merge</code>, this option is
implicit.
</p>
</dd>
@@ -1158,7 +1156,7 @@ the submodule itself.</p></div>
superproject. If this option is given, the submodule&#8217;s HEAD will not
be detached. If a merge failure prevents this process, you will have
to resolve these failures with <a href="git-rebase.html">git-rebase(1)</a>.
- If the key <tt>submodule.$name.update</tt> is set to <tt>rebase</tt>, this option is
+ If the key <code>submodule.$name.update</code> is set to <code>rebase</code>, this option is
implicit.
</p>
</dd>
@@ -1192,7 +1190,7 @@ the submodule itself.</p></div>
this option will be passed to the <a href="git-clone.html">git-clone(1)</a> command.
</p>
<div class="paragraph"><p><strong>NOTE</strong>: Do <strong>not</strong> use this option unless you have read the note
-for <a href="git-clone.html">git-clone(1)</a>'s <tt>--reference</tt> and <tt>--shared</tt> options carefully.</p></div>
+for <a href="git-clone.html">git-clone(1)</a>'s <code>--reference</code> and <code>--shared</code> options carefully.</p></div>
</dd>
<dt class="hdlist1">
--recursive
@@ -1233,7 +1231,7 @@ for <a href="git-clone.html">git-clone(1)</a>'s <tt>--reference</tt> and <tt>--s
<div class="sectionbody">
<div class="paragraph"><p>When initializing submodules, a .gitmodules file in the top-level directory
of the containing repository is used to find the url of each submodule.
-This file should be formatted in the same way as <tt>$GIT_DIR/config</tt>. The key
+This file should be formatted in the same way as <code>$GIT_DIR/config</code>. The key
to each submodule url is "submodule.$name.url". See <a href="gitmodules.html">gitmodules(5)</a>
for details.</p></div>
</div>