summaryrefslogtreecommitdiffstats
path: root/git-commit.html
diff options
context:
space:
mode:
authorJunio C Hamano <junio@hera.kernel.org>2008-07-06 05:20:31 +0000
committerJunio C Hamano <junio@hera.kernel.org>2008-07-06 05:20:31 +0000
commitba4b9286c25f18c7ebbb809ee5732a7810377ab6 (patch)
tree390507328a7564b65dc803683c34235700b97409 /git-commit.html
parent05bf9c54a827e48b2b576488f5170a3490b5180e (diff)
downloadgit-htmldocs-ba4b9286c25f18c7ebbb809ee5732a7810377ab6.tar.gz
Autogenerated HTML docs for v1.5.6.2-212-g08b5
Diffstat (limited to 'git-commit.html')
-rw-r--r--git-commit.html230
1 files changed, 139 insertions, 91 deletions
diff --git a/git-commit.html b/git-commit.html
index 696c0cbf2..e18732ada 100644
--- a/git-commit.html
+++ b/git-commit.html
@@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
-<meta name="generator" content="AsciiDoc 7.0.2" />
+<meta name="generator" content="AsciiDoc 8.2.5" />
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
@@ -16,8 +16,13 @@ body {
margin: 1em 5% 1em 5%;
}
-a { color: blue; }
-a:visited { color: fuchsia; }
+a {
+ color: blue;
+ text-decoration: underline;
+}
+a:visited {
+ color: fuchsia;
+}
em {
font-style: italic;
@@ -39,13 +44,18 @@ h1, h2, h3, h4, h5, h6 {
line-height: 1.3;
}
-h1 {
+h1, h2, h3 {
border-bottom: 2px solid silver;
}
h2 {
- border-bottom: 2px solid silver;
padding-top: 0.5em;
}
+h3 {
+ float: left;
+}
+h3 + * {
+ clear: left;
+}
div.sectionbody {
font-family: serif;
@@ -70,7 +80,7 @@ span#author {
color: #527bbd;
font-family: sans-serif;
font-weight: bold;
- font-size: 1.2em;
+ font-size: 1.1em;
}
span#email {
}
@@ -139,6 +149,9 @@ div.sidebarblock > div.content {
padding: 0.5em;
}
+div.listingblock {
+ margin-right: 0%;
+}
div.listingblock > div.content {
border: 1px solid silver;
background: #f4f4f4;
@@ -148,9 +161,13 @@ div.listingblock > div.content {
div.quoteblock > div.content {
padding-left: 2.0em;
}
-div.quoteblock .attribution {
+
+div.attribution {
text-align: right;
}
+div.verseblock + div.attribution {
+ text-align: left;
+}
div.admonitionblock .icon {
vertical-align: top;
@@ -194,13 +211,12 @@ dd > *:first-child {
ul, ol {
list-style-position: outside;
}
-ol.olist2 {
+div.olist2 ol {
list-style-type: lower-alpha;
}
div.tableblock > table {
- border-color: #527bbd;
- border-width: 3px;
+ border: 3px solid #527bbd;
}
thead {
font-family: sans-serif;
@@ -214,6 +230,9 @@ div.hlist {
margin-top: 0.8em;
margin-bottom: 0.8em;
}
+div.hlist td {
+ padding-bottom: 5px;
+}
td.hlist1 {
vertical-align: top;
font-style: italic;
@@ -226,7 +245,33 @@ td.hlist2 {
@media print {
div#footer-badges { display: none; }
}
-include::./stylesheets/xhtml11-manpage.css[]
+
+div#toctitle {
+ color: #527bbd;
+ font-family: sans-serif;
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 1.0em;
+ margin-bottom: 0.1em;
+}
+
+div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+div.toclevel2 {
+ margin-left: 2em;
+ font-size: 0.9em;
+}
+div.toclevel3 {
+ margin-left: 4em;
+ font-size: 0.9em;
+}
+div.toclevel4 {
+ margin-left: 6em;
+ font-size: 0.9em;
+}
+include1::./stylesheets/xhtml11-manpage.css[]
/* Workarounds for IE6's broken and incomplete CSS2. */
div.sidebar-content {
@@ -255,6 +300,9 @@ div.exampleblock-content {
border-left: 2px solid silver;
padding-left: 0.5em;
}
+
+/* IE6 sets dynamically generated links as visited. */
+div#toc a:visited { color: blue; }
</style>
<title>git-commit(1)</title>
</head>
@@ -278,22 +326,22 @@ git-commit(1) Manual Page
[--allow-empty] [--no-verify] [-e] [--author=&lt;author&gt;]
[--cleanup=&lt;mode&gt;] [--] [[-i | -o ]&lt;file&gt;&#8230;]</div></div>
</div>
-<h2>DESCRIPTION</h2>
+<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
-<p>Use <em>git commit</em> to store the current contents of the index in a new
-commit along with a log message describing the changes you have made.</p>
-<p>The content to be added can be specified in several ways:</p>
-<ol>
+<div class="para"><p>Stores the current contents of the index in a new commit along
+with a log message from the user describing the changes.</p></div>
+<div class="para"><p>The content to be added can be specified in several ways:</p></div>
+<div class="olist"><ol>
<li>
<p>
-by using <tt>git-add</tt> to incrementally "add" changes to the
+by using <em>git-add</em> to incrementally "add" changes to the
index before using the <em>commit</em> command (Note: even modified
files must be "added");
</p>
</li>
<li>
<p>
-by using <tt>git-rm</tt> to remove files from the working tree
+by using <em>git-rm</em> to remove files from the working tree
and the index, again before using the <em>commit</em> command;
</p>
</li>
@@ -317,20 +365,20 @@ by using the -a switch with the <em>commit</em> command to automatically
<p>
by using the --interactive switch with the <em>commit</em> command to decide one
by one which files should be part of the commit, before finalizing the
- operation. Currently, this is done by invoking <tt>git-add --interactive</tt>.
+ operation. Currently, this is done by invoking <em>git-add --interactive</em>.
</p>
</li>
-</ol>
-<p>The <tt>git-status</tt> command can be used to obtain a
+</ol></div>
+<div class="para"><p>The <em>git-status</em> command can be used to obtain a
summary of what is included by any of the above for the next
commit by giving the same set of parameters you would give to
-this command.</p>
-<p>If you make a commit and then find a mistake immediately after
-that, you can recover from it with <tt>git-reset</tt>.</p>
+this command.</p></div>
+<div class="para"><p>If you make a commit and then find a mistake immediately after
+that, you can recover from it with <em>git-reset</em>.</p></div>
</div>
-<h2>OPTIONS</h2>
+<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
-<dl>
+<div class="vlist"><dl>
<dt>
-a
</dt>
@@ -493,7 +541,7 @@ that, you can recover from it with <tt>git-reset</tt>.</p>
the current tip as parents &#8212; so the current top commit is
discarded.
</p>
-<p>It is a rough equivalent for:</p>
+<div class="para"><p>It is a rough equivalent for:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt> $ git reset --soft HEAD^
@@ -501,7 +549,7 @@ that, you can recover from it with <tt>git-reset</tt>.</p>
$ git commit -c ORIG_HEAD
</tt></pre>
</div></div>
-<p>but can be used to amend a merge commit.</p>
+<div class="para"><p>but can be used to amend a merge commit.</p></div>
</dd>
<dt>
-i
@@ -528,7 +576,7 @@ that, you can recover from it with <tt>git-reset</tt>.</p>
Make a commit only from the paths specified on the
command line, disregarding any contents that have been
staged so far. This is the default mode of operation of
- <em>git commit</em> if any paths are given on the command line,
+ <em>git-commit</em> if any paths are given on the command line,
in which case this option can be omitted.
If this option is specified together with <em>--amend</em>, then
no paths need be specified, which can be used to amend
@@ -546,9 +594,9 @@ that, you can recover from it with <tt>git-reset</tt>.</p>
<p>
Show untracked files (Default: <em>all</em>).
</p>
-<p>The mode parameter is optional, and is used to specify
-the handling of untracked files. The possible options are:</p>
-<ul>
+<div class="para"><p>The mode parameter is optional, and is used to specify
+the handling of untracked files. The possible options are:</p></div>
+<div class="ilist"><ul>
<li>
<p>
<em>no</em> - Show no untracked files
@@ -564,10 +612,10 @@ the handling of untracked files. The possible options are:</p>
<em>all</em> - Also shows individual files in untracked directories.
</p>
</li>
-</ul>
-<p>See <a href="git-config.html">git-config(1)</a> for configuration variable
+</ul></div>
+<div class="para"><p>See <a href="git-config.html">git-config(1)</a> for configuration variable
used to change the default for when the option is not
-specified.</p>
+specified.</p></div>
</dd>
<dt>
-v
@@ -614,21 +662,21 @@ specified.</p>
of what have been staged before.
</p>
</dd>
-</dl>
+</dl></div>
</div>
-<h2>EXAMPLES</h2>
+<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
-<p>When recording your own work, the contents of modified files in
+<div class="para"><p>When recording your own work, the contents of modified files in
your working tree are temporarily stored to a staging area
-called the "index" with <tt>git-add</tt>. A file can be
+called the "index" with <em>git-add</em>. A file can be
reverted back, only in the index but not in the working tree,
to that of the last commit with <tt>git reset HEAD &#8212; &lt;file&gt;</tt>,
-which effectively reverts <tt>git-add</tt> and prevents the changes to
+which effectively reverts <em>git-add</em> and prevents the changes to
this file from participating in the next commit. After building
the state to be committed incrementally with these commands,
<tt>git commit</tt> (without any pathname parameter) is used to record what
has been staged so far. This is the most basic form of the
-command. An example:</p>
+command. An example:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ edit hello.c
@@ -636,25 +684,25 @@ $ git rm goodbye.c
$ git add hello.c
$ git commit</tt></pre>
</div></div>
-<p>Instead of staging files after each individual change, you can
+<div class="para"><p>Instead of staging files after each individual change, you can
tell <tt>git commit</tt> to notice the changes to the files whose
contents are tracked in
your working tree and do corresponding <tt>git add</tt> and <tt>git rm</tt>
for you. That is, this example does the same as the earlier
-example if there is no other change in your working tree:</p>
+example if there is no other change in your working tree:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ edit hello.c
$ rm goodbye.c
$ git commit -a</tt></pre>
</div></div>
-<p>The command <tt>git commit -a</tt> first looks at your working tree,
+<div class="para"><p>The command <tt>git commit -a</tt> first looks at your working tree,
notices that you have modified hello.c and removed goodbye.c,
-and performs necessary <tt>git add</tt> and <tt>git rm</tt> for you.</p>
-<p>After staging changes to many files, you can alter the order the
+and performs necessary <tt>git add</tt> and <tt>git rm</tt> for you.</p></div>
+<div class="para"><p>After staging changes to many files, you can alter the order the
changes are recorded in, by giving pathnames to <tt>git commit</tt>.
When pathnames are given, the command makes a commit that
-only records the changes made to the named paths:</p>
+only records the changes made to the named paths:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ edit hello.c hello.h
@@ -662,24 +710,24 @@ $ git add hello.c hello.h
$ edit Makefile
$ git commit Makefile</tt></pre>
</div></div>
-<p>This makes a commit that records the modification to <tt>Makefile</tt>.
+<div class="para"><p>This makes a commit that records the modification to <tt>Makefile</tt>.
The changes staged for <tt>hello.c</tt> and <tt>hello.h</tt> are not included
in the resulting commit. However, their changes are not lost &#8212;
they are still staged and merely held back. After the above
-sequence, if you do:</p>
+sequence, if you do:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ git commit</tt></pre>
</div></div>
-<p>this second commit would record the changes to <tt>hello.c</tt> and
-<tt>hello.h</tt> as expected.</p>
-<p>After a merge (initiated by <tt>git-merge</tt> or <tt>git-pull</tt>) stops
+<div class="para"><p>this second commit would record the changes to <tt>hello.c</tt> and
+<tt>hello.h</tt> as expected.</p></div>
+<div class="para"><p>After a merge (initiated by <em>git-merge</em> or <em>git-pull</em>) stops
because of conflicts, cleanly merged
paths are already staged to be committed for you, and paths that
conflicted are left in unmerged state. You would have to first
-check which paths are conflicting with <tt>git-status</tt>
+check which paths are conflicting with <em>git-status</em>
and after fixing them manually in your working tree, you would
-stage the result as usual with <tt>git-add</tt>:</p>
+stage the result as usual with <em>git-add</em>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ git status | grep unmerged
@@ -687,29 +735,29 @@ unmerged: hello.c
$ edit hello.c
$ git add hello.c</tt></pre>
</div></div>
-<p>After resolving conflicts and staging the result, <tt>git ls-files -u</tt>
+<div class="para"><p>After resolving conflicts and staging the result, <tt>git ls-files -u</tt>
would stop mentioning the conflicted path. When you are done,
-run <tt>git commit</tt> to finally record the merge:</p>
+run <tt>git commit</tt> to finally record the merge:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ git commit</tt></pre>
</div></div>
-<p>As with the case to record your own changes, you can use <tt>-a</tt>
+<div class="para"><p>As with the case to record your own changes, you can use <tt>-a</tt>
option to save typing. One difference is that during a merge
resolution, you cannot use <tt>git commit</tt> with pathnames to
alter the order the changes are committed, because the merge
should be recorded as a single commit. In fact, the command
-refuses to run when given pathnames (but see <tt>-i</tt> option).</p>
+refuses to run when given pathnames (but see <tt>-i</tt> option).</p></div>
</div>
-<h2>DISCUSSION</h2>
+<h2 id="_discussion">DISCUSSION</h2>
<div class="sectionbody">
-<p>Though not required, it's a good idea to begin the commit message
+<div class="para"><p>Though not required, it's a good idea to begin the commit message
with a single short (less than 50 character) line summarizing the
change, followed by a blank line and then a more thorough description.
Tools that turn commits into email, for example, use the first line
-on the Subject: line and the rest of the commit in the body.</p>
-<p>At the core level, git is character encoding agnostic.</p>
-<ul>
+on the Subject: line and the rest of the commit in the body.</p></div>
+<div class="para"><p>At the core level, git is character encoding agnostic.</p></div>
+<div class="ilist"><ul>
<li>
<p>
The pathnames recorded in the index and in the tree objects
@@ -733,17 +781,17 @@ The commit log messages are uninterpreted sequence of non-NUL
bytes.
</p>
</li>
-</ul>
-<p>Although we encourage that the commit log messages are encoded
+</ul></div>
+<div class="para"><p>Although we encourage that the commit log messages are encoded
in UTF-8, both the core and git Porcelain are designed not to
force UTF-8 on projects. If all participants of a particular
project find it more convenient to use legacy encodings, git
does not forbid it. However, there are a few things to keep in
-mind.</p>
-<ol>
+mind.</p></div>
+<div class="olist"><ol>
<li>
<p>
-<tt>git-commit-tree</tt> (hence, <tt>git-commit</tt> which uses it) issues
+<em>git-commit-tree</em> (hence, <em>git-commit</em> which uses it) issues
a warning if the commit log message given to it does not look
like a valid UTF-8 string, unless you explicitly say your
project uses a legacy encoding. The way to say this is to
@@ -754,14 +802,14 @@ mind.</p>
<pre><tt>[i18n]
commitencoding = ISO-8859-1</tt></pre>
</div></div>
-<p>Commit objects created with the above setting record the value
+<div class="para"><p>Commit objects created with the above setting record the value
of <tt>i18n.commitencoding</tt> in its <tt>encoding</tt> header. This is to
help other people who look at them later. Lack of this header
-implies that the commit log message is encoded in UTF-8.</p>
+implies that the commit log message is encoded in UTF-8.</p></div>
</li>
<li>
<p>
-<tt>git-log</tt>, <tt>git-show</tt> and friends looks at the <tt>encoding</tt>
+<em>git-log</em>, <em>git-show</em> and friends looks at the <tt>encoding</tt>
header of a commit object, and tries to re-code the log
message into UTF-8 unless otherwise specified. You can
specify the desired output encoding with
@@ -772,48 +820,48 @@ implies that the commit log message is encoded in UTF-8.</p>
<pre><tt>[i18n]
logoutputencoding = ISO-8859-1</tt></pre>
</div></div>
-<p>If you do not have this configuration variable, the value of
-<tt>i18n.commitencoding</tt> is used instead.</p>
+<div class="para"><p>If you do not have this configuration variable, the value of
+<tt>i18n.commitencoding</tt> is used instead.</p></div>
</li>
-</ol>
-<p>Note that we deliberately chose not to re-code the commit log
+</ol></div>
+<div class="para"><p>Note that we deliberately chose not to re-code the commit log
message when a commit is made to force UTF-8 at the commit
object level, because re-coding to UTF-8 is not necessarily a
-reversible operation.</p>
+reversible operation.</p></div>
</div>
-<h2>ENVIRONMENT AND CONFIGURATION VARIABLES</h2>
+<h2 id="_environment_and_configuration_variables">ENVIRONMENT AND CONFIGURATION VARIABLES</h2>
<div class="sectionbody">
-<p>The editor used to edit the commit log message will be chosen from the
+<div class="para"><p>The editor used to edit the commit log message will be chosen from the
GIT_EDITOR environment variable, the core.editor configuration variable, the
VISUAL environment variable, or the EDITOR environment variable (in that
-order).</p>
+order).</p></div>
</div>
-<h2>HOOKS</h2>
+<h2 id="_hooks">HOOKS</h2>
<div class="sectionbody">
-<p>This command can run <tt>commit-msg</tt>, <tt>prepare-commit-msg</tt>, <tt>pre-commit</tt>,
+<div class="para"><p>This command can run <tt>commit-msg</tt>, <tt>prepare-commit-msg</tt>, <tt>pre-commit</tt>,
and <tt>post-commit</tt> hooks. See <a href="githooks.html">githooks(5)</a> for more
-information.</p>
+information.</p></div>
</div>
-<h2>SEE ALSO</h2>
+<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
-<p><a href="git-add.html">git-add(1)</a>,
+<div class="para"><p><a href="git-add.html">git-add(1)</a>,
<a href="git-rm.html">git-rm(1)</a>,
<a href="git-mv.html">git-mv(1)</a>,
<a href="git-merge.html">git-merge(1)</a>,
-<a href="git-commit-tree.html">git-commit-tree(1)</a></p>
+<a href="git-commit-tree.html">git-commit-tree(1)</a></p></div>
</div>
-<h2>Author</h2>
+<h2 id="_author">Author</h2>
<div class="sectionbody">
-<p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt; and
-Junio C Hamano &lt;junkio@cox.net&gt;</p>
+<div class="para"><p>Written by Linus Torvalds &lt;torvalds@osdl.org&gt; and
+Junio C Hamano &lt;junkio@cox.net&gt;</p></div>
</div>
-<h2>GIT</h2>
+<h2 id="_git">GIT</h2>
<div class="sectionbody">
-<p>Part of the <a href="git.html">git(1)</a> suite</p>
+<div class="para"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
</div>
<div id="footer">
<div id="footer-text">
-Last updated 02-Jul-2008 03:01:36 UTC
+Last updated 2008-07-06 05:16:39 UTC
</div>
</div>
</body>