summaryrefslogtreecommitdiffstats
path: root/git-commit.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-12-18 16:43:11 -0800
committerJunio C Hamano <gitster@pobox.com>2012-12-18 16:43:11 -0800
commit9d9711544dc3090db6e5c52f9ce9c300bf4f5c14 (patch)
tree23257b9801739fd96c9e82ef98a17500dce9f88e /git-commit.html
parent9629d4f49e5ffcff5c5beb5c40bedcffcabcd905 (diff)
downloadgit-htmldocs-9d9711544dc3090db6e5c52f9ce9c300bf4f5c14.tar.gz
Autogenerated HTML docs for v1.8.1-rc2-5-g252f9
Diffstat (limited to 'git-commit.html')
-rw-r--r--git-commit.html545
1 files changed, 366 insertions, 179 deletions
diff --git a/git-commit.html b/git-commit.html
index 7811aef6d..fc31e1359 100644
--- a/git-commit.html
+++ b/git-commit.html
@@ -2,15 +2,25 @@
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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 8.5.2" />
+<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
+<meta name="generator" content="AsciiDoc 8.6.8" />
<title>git-commit(1)</title>
<style type="text/css">
-/* Debug borders */
-p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
-/*
- border: 1px solid red;
-*/
+/* Shared CSS for AsciiDoc xhtml11 and html5 backends */
+
+/* Default font. */
+body {
+ font-family: Georgia,serif;
+}
+
+/* Title font. */
+h1, h2, h3, h4, h5, h6,
+div.title, caption.title,
+thead, p.table.header,
+#toctitle,
+#author, #revnumber, #revdate, #revremark,
+#footer {
+ font-family: Arial,Helvetica,sans-serif;
}
body {
@@ -35,13 +45,8 @@ strong {
color: #083194;
}
-tt {
- color: navy;
-}
-
h1, h2, h3, h4, h5, h6 {
color: #527bbd;
- font-family: sans-serif;
margin-top: 1.2em;
margin-bottom: 0.5em;
line-height: 1.3;
@@ -59,9 +64,11 @@ h3 {
h3 + * {
clear: left;
}
+h5 {
+ font-size: 1.0em;
+}
div.sectionbody {
- font-family: serif;
margin-left: 0;
}
@@ -77,45 +84,48 @@ p {
ul, ol, li > p {
margin-top: 0;
}
+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;
}
-span#author {
+
+#author {
color: #527bbd;
- font-family: sans-serif;
font-weight: bold;
font-size: 1.1em;
}
-span#email {
+#email {
}
-span#revnumber, span#revdate, span#revremark {
- font-family: sans-serif;
+#revnumber, #revdate, #revremark {
}
-div#footer {
- font-family: sans-serif;
+#footer {
font-size: small;
border-top: 2px solid silver;
padding-top: 0.5em;
margin-top: 4.0em;
}
-div#footer-text {
+#footer-text {
float: left;
padding-bottom: 0.5em;
}
-div#footer-badges {
+#footer-badges {
float: right;
padding-bottom: 0.5em;
}
-div#preamble {
+#preamble {
margin-top: 1.5em;
margin-bottom: 1.5em;
}
-div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
+div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
margin-top: 1.0em;
@@ -135,7 +145,6 @@ div.content { /* Block element content. */
/* Block element titles. */
div.title, caption.title {
color: #527bbd;
- font-family: sans-serif;
font-weight: bold;
text-align: left;
margin-top: 1.0em;
@@ -157,13 +166,15 @@ div.content + div.title {
div.sidebarblock > div.content {
background: #ffffee;
- border: 1px solid silver;
+ border: 1px solid #dddddd;
+ border-left: 4px solid #f0f0f0;
padding: 0.5em;
}
div.listingblock > div.content {
- border: 1px solid silver;
- background: #f4f4f4;
+ border: 1px solid #dddddd;
+ border-left: 5px solid #f0f0f0;
+ background: #f8f8f8;
padding: 0.5em;
}
@@ -171,8 +182,8 @@ div.quoteblock, div.verseblock {
padding-left: 1.0em;
margin-left: 1.0em;
margin-right: 10%;
- border-left: 5px solid #dddddd;
- color: #777777;
+ border-left: 5px solid #f0f0f0;
+ color: #888;
}
div.quoteblock > div.attribution {
@@ -180,8 +191,9 @@ div.quoteblock > div.attribution {
text-align: right;
}
-div.verseblock > div.content {
- white-space: pre;
+div.verseblock > pre.content {
+ font-family: inherit;
+ font-size: inherit;
}
div.verseblock > div.attribution {
padding-top: 0.75em;
@@ -254,35 +266,12 @@ div.compact div, div.compact div {
margin-bottom: 0.1em;
}
-div.tableblock > table {
- border: 3px solid #527bbd;
-}
-thead, p.table.header {
- font-family: sans-serif;
- font-weight: bold;
-}
tfoot {
font-weight: bold;
}
td > div.verse {
white-space: pre;
}
-p.table {
- margin-top: 0;
-}
-/* Because the table frame attribute is overriden by CSS in most browsers. */
-div.tableblock > table[frame="void"] {
- border-style: none;
-}
-div.tableblock > table[frame="hsides"] {
- border-left-style: none;
- border-right-style: none;
-}
-div.tableblock > table[frame="vsides"] {
- border-top-style: none;
- border-bottom-style: none;
-}
-
div.hdlist {
margin-top: 0.8em;
@@ -339,25 +328,32 @@ span.footnote, span.footnoteref {
min-width: 100px;
}
+div.colist td {
+ padding-right: 0.5em;
+ padding-bottom: 0.3em;
+ vertical-align: top;
+}
+div.colist td img {
+ margin-top: 0.3em;
+}
@media print {
- div#footer-badges { display: none; }
+ #footer-badges { display: none; }
}
-div#toc {
+#toc {
margin-bottom: 2.5em;
}
-div#toctitle {
+#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 {
+div.toclevel0, div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
margin-top: 0;
margin-bottom: 0;
}
@@ -373,69 +369,173 @@ div.toclevel4 {
margin-left: 6em;
font-size: 0.9em;
}
-/* Overrides for manpage documents */
-h1 {
- padding-top: 0.5em;
- padding-bottom: 0.5em;
- border-top: 2px solid silver;
- border-bottom: 2px solid silver;
+
+span.aqua { color: aqua; }
+span.black { color: black; }
+span.blue { color: blue; }
+span.fuchsia { color: fuchsia; }
+span.gray { color: gray; }
+span.green { color: green; }
+span.lime { color: lime; }
+span.maroon { color: maroon; }
+span.navy { color: navy; }
+span.olive { color: olive; }
+span.purple { color: purple; }
+span.red { color: red; }
+span.silver { color: silver; }
+span.teal { color: teal; }
+span.white { color: white; }
+span.yellow { color: yellow; }
+
+span.aqua-background { background: aqua; }
+span.black-background { background: black; }
+span.blue-background { background: blue; }
+span.fuchsia-background { background: fuchsia; }
+span.gray-background { background: gray; }
+span.green-background { background: green; }
+span.lime-background { background: lime; }
+span.maroon-background { background: maroon; }
+span.navy-background { background: navy; }
+span.olive-background { background: olive; }
+span.purple-background { background: purple; }
+span.red-background { background: red; }
+span.silver-background { background: silver; }
+span.teal-background { background: teal; }
+span.white-background { background: white; }
+span.yellow-background { background: yellow; }
+
+span.big { font-size: 2em; }
+span.small { font-size: 0.6em; }
+
+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
+ *
+ * */
+
+div.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
}
-h2 {
+div.tableblock > table {
+ border: 3px solid #527bbd;
+}
+thead, p.table.header {
+ font-weight: bold;
+ color: #527bbd;
+}
+p.table {
+ margin-top: 0;
+}
+/* Because the table frame attribute is overriden by CSS in most browsers. */
+div.tableblock > table[frame="void"] {
border-style: none;
}
-div.sectionbody {
- margin-left: 5%;
+div.tableblock > table[frame="hsides"] {
+ border-left-style: none;
+ border-right-style: none;
}
-
-@media print {
- div#toc { display: none; }
+div.tableblock > table[frame="vsides"] {
+ border-top-style: none;
+ border-bottom-style: none;
}
-/* Workarounds for IE6's broken and incomplete CSS2. */
-div.sidebar-content {
- background: #ffffee;
- border: 1px solid silver;
- padding: 0.5em;
+/*
+ * html5 specific
+ *
+ * */
+
+table.tableblock {
+ margin-top: 1.0em;
+ margin-bottom: 1.5em;
}
-div.sidebar-title, div.image-title {
- color: #527bbd;
- font-family: sans-serif;
+thead, p.tableblock.header {
font-weight: bold;
- margin-top: 0.0em;
- margin-bottom: 0.5em;
+ color: #527bbd;
+}
+p.tableblock {
+ margin-top: 0;
+}
+table.tableblock {
+ border-width: 3px;
+ border-spacing: 0px;
+ border-style: solid;
+ border-color: #527bbd;
+ border-collapse: collapse;
+}
+th.tableblock, td.tableblock {
+ border-width: 1px;
+ padding: 4px;
+ border-style: solid;
+ border-color: #527bbd;
}
-div.listingblock div.content {
- border: 1px solid silver;
- background: #f4f4f4;
- padding: 0.5em;
+table.tableblock.frame-topbot {
+ border-left-style: hidden;
+ border-right-style: hidden;
+}
+table.tableblock.frame-sides {
+ border-top-style: hidden;
+ border-bottom-style: hidden;
+}
+table.tableblock.frame-none {
+ border-style: hidden;
}
-div.quoteblock-attribution {
- padding-top: 0.5em;
+th.tableblock.halign-left, td.tableblock.halign-left {
+ text-align: left;
+}
+th.tableblock.halign-center, td.tableblock.halign-center {
+ text-align: center;
+}
+th.tableblock.halign-right, td.tableblock.halign-right {
text-align: right;
}
-div.verseblock-content {
- white-space: pre;
+th.tableblock.valign-top, td.tableblock.valign-top {
+ vertical-align: top;
}
-div.verseblock-attribution {
- padding-top: 0.75em;
- text-align: left;
+th.tableblock.valign-middle, td.tableblock.valign-middle {
+ vertical-align: middle;
+}
+th.tableblock.valign-bottom, td.tableblock.valign-bottom {
+ vertical-align: bottom;
}
-div.exampleblock-content {
- border-left: 3px solid #dddddd;
- padding-left: 0.5em;
+
+/*
+ * manpage specific
+ *
+ * */
+
+body.manpage h1 {
+ padding-top: 0.5em;
+ padding-bottom: 0.5em;
+ border-top: 2px solid silver;
+ border-bottom: 2px solid silver;
+}
+body.manpage h2 {
+ border-style: none;
+}
+body.manpage div.sectionbody {
+ margin-left: 3em;
}
-/* IE6 sets dynamically generated links as visited. */
-div#toc a:visited { color: blue; }
+@media print {
+ body.manpage div#toc { display: none; }
+}
+
+
</style>
<script type="text/javascript">
/*<![CDATA[*/
-window.onload = function(){asciidoc.footnotes();}
var asciidoc = { // Namespace.
/////////////////////////////////////////////////////////////////////
@@ -477,7 +577,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).
@@ -497,6 +597,25 @@ toc: function (toclevels) {
}
var toc = document.getElementById("toc");
+ if (!toc) {
+ return;
+ }
+
+ // Delete existing TOC entries in case we're reloading the TOC.
+ var tocEntriesToRemove = [];
+ var i;
+ for (i = 0; i < toc.childNodes.length; i++) {
+ var entry = toc.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div'
+ && entry.getAttribute("class")
+ && entry.getAttribute("class").match(/^toclevel/))
+ tocEntriesToRemove.push(entry);
+ }
+ for (i = 0; i < tocEntriesToRemove.length; i++) {
+ toc.removeChild(tocEntriesToRemove[i]);
+ }
+
+ // Rebuild TOC entries.
var entries = tocEntries(document.getElementById("content"), toclevels);
for (var i = 0; i < entries.length; ++i) {
var entry = entries[i];
@@ -524,24 +643,44 @@ toc: function (toclevels) {
*/
footnotes: function () {
- var cont = document.getElementById("content");
+ // Delete existing footnote entries in case we're reloading the footnodes.
+ var i;
var noteholder = document.getElementById("footnotes");
+ if (!noteholder) {
+ return;
+ }
+ var entriesToRemove = [];
+ for (i = 0; i < noteholder.childNodes.length; i++) {
+ var entry = noteholder.childNodes[i];
+ if (entry.nodeName.toLowerCase() == 'div' && entry.getAttribute("class") == "footnote")
+ entriesToRemove.push(entry);
+ }
+ for (i = 0; i < entriesToRemove.length; i++) {
+ noteholder.removeChild(entriesToRemove[i]);
+ }
+
+ // Rebuild footnote entries.
+ var cont = document.getElementById("content");
var spans = cont.getElementsByTagName("span");
var refs = {};
var n = 0;
for (i=0; i<spans.length; i++) {
if (spans[i].className == "footnote") {
n++;
- // Use [\s\S] in place of . so multi-line matches work.
- // Because JavaScript has no s (dotall) regex flag.
- note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ var note = spans[i].getAttribute("data-note");
+ if (!note) {
+ // Use [\s\S] in place of . so multi-line matches work.
+ // Because JavaScript has no s (dotall) regex flag.
+ note = spans[i].innerHTML.match(/\s*\[([\s\S]*)]\s*/)[1];
+ spans[i].innerHTML =
+ "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
+ "' title='View footnote' class='footnote'>" + n + "</a>]";
+ spans[i].setAttribute("data-note", note);
+ }
noteholder.innerHTML +=
"<div class='footnote' id='_footnote_" + n + "'>" +
"<a href='#_footnoteref_" + n + "' title='Return to text'>" +
n + "</a>. " + note + "</div>";
- spans[i].innerHTML =
- "[<a id='_footnoteref_" + n + "' href='#_footnote_" + n +
- "' title='View footnote' class='footnote'>" + n + "</a>]";
var id =spans[i].getAttribute("id");
if (id != null) refs["#"+id] = n;
}
@@ -561,13 +700,36 @@ footnotes: function () {
}
}
}
+},
+
+install: function(toclevels) {
+ var timerId;
+
+ function reinstall() {
+ asciidoc.footnotes();
+ if (toclevels) {
+ asciidoc.toc(toclevels);
+ }
+ }
+
+ function reinstallAndRemoveTimer() {
+ clearInterval(timerId);
+ reinstall();
+ }
+
+ timerId = setInterval(reinstall, 500);
+ if (document.addEventListener)
+ document.addEventListener("DOMContentLoaded", reinstallAndRemoveTimer, false);
+ else
+ window.onload = reinstallAndRemoveTimer;
}
}
+asciidoc.install();
/*]]>*/
</script>
</head>
-<body>
+<body class="manpage">
<div id="header">
<h1>
git-commit(1) Manual Page
@@ -580,18 +742,21 @@ git-commit(1) Manual Page
</div>
</div>
<div id="content">
+<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
-<div class="verseblock-content"><em>git commit</em> [-a | --interactive | --patch] [-s] [-v] [-u&lt;mode&gt;] [--amend]
+<pre class="content"><em>git commit</em> [-a | --interactive | --patch] [-s] [-v] [-u&lt;mode&gt;] [--amend]
[--dry-run] [(-c | -C | --fixup | --squash) &lt;commit&gt;]
[-F &lt;file&gt; | -m &lt;msg&gt;] [--reset-author] [--allow-empty]
[--allow-empty-message] [--no-verify] [-e] [--author=&lt;author&gt;]
[--date=&lt;date&gt;] [--cleanup=&lt;mode&gt;] [--status | --no-status]
- [-i | -o] [-S[&lt;keyid&gt;]] [--] [&lt;file&gt;&#8230;]</div>
-<div class="verseblock-attribution">
+ [-i | -o] [-S[&lt;keyid&gt;]] [--] [&lt;file&gt;&#8230;]</pre>
+<div class="attribution">
</div></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p>Stores the current contents of the index in a new commit along
@@ -637,12 +802,14 @@ by using the --interactive or --patch switches with the <em>commit</em> command
</p>
</li>
</ol></div>
-<div class="paragraph"><p>The <tt>--dry-run</tt> option can be used to obtain a
+<div class="paragraph"><p>The <code>--dry-run</code> option 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 (options and paths).</p></div>
<div class="paragraph"><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>
+</div>
+<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
@@ -702,7 +869,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
</dt>
<dd>
<p>
- Construct a commit message for use with <tt>rebase --autosquash</tt>.
+ Construct a commit message for use with <code>rebase --autosquash</code>.
The commit message will be the subject line from the specified
commit with a prefix of "fixup! ". See <a href="git-rebase.html">git-rebase(1)</a>
for details.
@@ -713,10 +880,10 @@ that, you can recover from it with <em>git reset</em>.</p></div>
</dt>
<dd>
<p>
- Construct a commit message for use with <tt>rebase --autosquash</tt>.
+ Construct a commit message for use with <code>rebase --autosquash</code>.
The commit message subject line is taken from the specified
commit with a prefix of "squash! ". Can be used with additional
- commit message options (<tt>-m</tt>/<tt>-c</tt>/<tt>-C</tt>/<tt>-F</tt>). See
+ commit message options (<code>-m</code>/<code>-c</code>/<code>-C</code>/<code>-F</code>). See
<a href="git-rebase.html">git-rebase(1)</a> for details.
</p>
</dd>
@@ -737,7 +904,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<dd>
<p>
When doing a dry-run, give the output in the short-format. See
- <a href="git-status.html">git-status(1)</a> for details. Implies <tt>--dry-run</tt>.
+ <a href="git-status.html">git-status(1)</a> for details. Implies <code>--dry-run</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -755,7 +922,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<p>
When doing a dry-run, give the output in a porcelain-ready
format. See <a href="git-status.html">git-status(1)</a> for details. Implies
- <tt>--dry-run</tt>.
+ <code>--dry-run</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -764,7 +931,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<dd>
<p>
When doing a dry-run, give the output in a the long-format.
- Implies <tt>--dry-run</tt>.
+ Implies <code>--dry-run</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -775,9 +942,9 @@ that, you can recover from it with <em>git reset</em>.</p></div>
</dt>
<dd>
<p>
- When showing <tt>short</tt> or <tt>porcelain</tt> status output, terminate
+ When showing <code>short</code> or <code>porcelain</code> status output, terminate
entries in the status output with NUL, instead of LF. If no
- format is given, implies the <tt>--porcelain</tt> output format.
+ format is given, implies the <code>--porcelain</code> output format.
</p>
</dd>
<dt class="hdlist1">
@@ -798,7 +965,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<dd>
<p>
Override the commit author. Specify an explicit author using the
- standard <tt>A U Thor &lt;author@example.com&gt;</tt> format. Otherwise &lt;author&gt;
+ standard <code>A U Thor &lt;author@example.com&gt;</code> format. Otherwise &lt;author&gt;
is assumed to be a pattern and is used to search for an existing
commit by that author (i.e. rev-list --all -i --author=&lt;author&gt;);
the commit author is then copied from the first such commit found.
@@ -832,13 +999,13 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<dd>
<p>
When editing the commit message, start the editor with the
- contents in the given file. The <tt>commit.template</tt> configuration
+ contents in the given file. The <code>commit.template</code> configuration
variable is often used to give this option implicitly to the
command. This mechanism can be used by projects that want to
guide participants with some hints on what to write in the message
in what order. If the user exits the editor without editing the
message, the commit is aborted. This has no effect when a message
- is given by other means, e.g. with the <tt>-m</tt> or <tt>-F</tt> options.
+ is given by other means, e.g. with the <code>-m</code> or <code>-F</code> options.
</p>
</dd>
<dt class="hdlist1">
@@ -910,8 +1077,8 @@ that, you can recover from it with <em>git reset</em>.</p></div>
</dt>
<dd>
<p>
- The message taken from file with <tt>-F</tt>, command line with
- <tt>-m</tt>, and from file with <tt>-C</tt> are usually used as the
+ The message taken from file with <code>-F</code>, command line with
+ <code>-m</code>, and from file with <code>-C</code> are usually used as the
commit log message unmodified. This option lets you
further edit the message taken from these sources.
</p>
@@ -922,7 +1089,7 @@ that, you can recover from it with <em>git reset</em>.</p></div>
<dd>
<p>
Use the selected commit message without launching an editor.
- For example, <tt>git commit --amend --no-edit</tt> amends a commit
+ For example, <code>git commit --amend --no-edit</code> amends a commit
without changing its commit message.
</p>
</dd>
@@ -940,14 +1107,17 @@ that, you can recover from it with <em>git reset</em>.</p></div>
the current tip as parents&#8201;&#8212;&#8201;so the current top commit is
discarded.
</p>
+<div class="openblock">
+<div class="content">
<div class="paragraph"><p>It is a rough equivalent for:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt> $ git reset --soft HEAD^
+<pre><code> $ git reset --soft HEAD^
$ ... do something else to come up with the right tree ...
- $ git commit -c ORIG_HEAD</tt></pre>
+ $ git commit -c ORIG_HEAD</code></pre>
</div></div>
<div class="paragraph"><p>but can be used to amend a merge commit.</p></div>
+</div></div>
<div class="paragraph"><p>You should understand the implications of rewriting history if you
amend a commit that has already been published. (See the "RECOVERING
FROM UPSTREAM REBASE" section in <a href="git-rebase.html">git-rebase(1)</a>.)</p></div>
@@ -1116,10 +1286,12 @@ configuration variable documented in <a href="git-config.html">git-config(1)</a>
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_date_formats">DATE FORMATS</h2>
<div class="sectionbody">
<div class="paragraph"><p>The GIT_AUTHOR_DATE, GIT_COMMITTER_DATE environment variables
-and the <tt>--date</tt> option
+and the <code>--date</code> option
support the following date formats:</p></div>
<div class="dlist"><dl>
<dt class="hdlist1">
@@ -1127,10 +1299,10 @@ Git internal format
</dt>
<dd>
<p>
- It is <tt>&lt;unix timestamp&gt; &lt;timezone offset&gt;</tt>, where <tt>&lt;unix
- timestamp&gt;</tt> is the number of seconds since the UNIX epoch.
- <tt>&lt;timezone offset&gt;</tt> is a positive or negative offset from UTC.
- For example CET (which is 2 hours ahead UTC) is <tt>+0200</tt>.
+ It is <code>&lt;unix timestamp&gt; &lt;timezone offset&gt;</code>, where <code>&lt;unix
+ timestamp&gt;</code> is the number of seconds since the UNIX epoch.
+ <code>&lt;timezone offset&gt;</code> is a positive or negative offset from UTC.
+ For example CET (which is 2 hours ahead UTC) is <code>+0200</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1139,7 +1311,7 @@ RFC 2822
<dd>
<p>
The standard email format as described by RFC 2822, for example
- <tt>Thu, 07 Apr 2005 22:13:13 +0200</tt>.
+ <code>Thu, 07 Apr 2005 22:13:13 +0200</code>.
</p>
</dd>
<dt class="hdlist1">
@@ -1148,8 +1320,8 @@ ISO 8601
<dd>
<p>
Time and date specified by the ISO 8601 standard, for example
- <tt>2005-04-07T22:13:13</tt>. The parser accepts a space instead of the
- <tt>T</tt> character as well.
+ <code>2005-04-07T22:13:13</code>. The parser accepts a space instead of the
+ <code>T</code> character as well.
</p>
<div class="admonitionblock">
<table><tr>
@@ -1157,68 +1329,70 @@ ISO 8601
<div class="title">Note</div>
</td>
<td class="content">In addition, the date part is accepted in the following formats:
-<tt>YYYY.MM.DD</tt>, <tt>MM/DD/YYYY</tt> and <tt>DD.MM.YYYY</tt>.</td>
+<code>YYYY.MM.DD</code>, <code>MM/DD/YYYY</code> and <code>DD.MM.YYYY</code>.</td>
</tr></table>
</div>
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="paragraph"><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 <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 -- &lt;file&gt;</tt>,
+to that of the last commit with <code>git reset HEAD -- &lt;file&gt;</code>,
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
+<code>git commit</code> (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></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ edit hello.c
+<pre><code>$ edit hello.c
$ git rm goodbye.c
$ git add hello.c
-$ git commit</tt></pre>
+$ git commit</code></pre>
</div></div>
<div class="paragraph"><p>Instead of staging files after each individual change, you can
-tell <tt>git commit</tt> to notice the changes to the files whose
+tell <code>git commit</code> 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>
+your working tree and do corresponding <code>git add</code> and <code>git rm</code>
for you. That is, this example does the same as the earlier
example if there is no other change in your working tree:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ edit hello.c
+<pre><code>$ edit hello.c
$ rm goodbye.c
-$ git commit -a</tt></pre>
+$ git commit -a</code></pre>
</div></div>
-<div class="paragraph"><p>The command <tt>git commit -a</tt> first looks at your working tree,
+<div class="paragraph"><p>The command <code>git commit -a</code> 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></div>
+and performs necessary <code>git add</code> and <code>git rm</code> for you.</p></div>
<div class="paragraph"><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>.
+changes are recorded in, by giving pathnames to <code>git commit</code>.
When pathnames are given, the command makes a commit that
only records the changes made to the named paths:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ edit hello.c hello.h
+<pre><code>$ edit hello.c hello.h
$ git add hello.c hello.h
$ edit Makefile
-$ git commit Makefile</tt></pre>
+$ git commit Makefile</code></pre>
</div></div>
-<div class="paragraph"><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
+<div class="paragraph"><p>This makes a commit that records the modification to <code>Makefile</code>.
+The changes staged for <code>hello.c</code> and <code>hello.h</code> are not included
in the resulting commit. However, their changes are not lost&#8201;&#8212;&#8201;they are still staged and merely held back. After the above
sequence, if you do:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git commit</tt></pre>
+<pre><code>$ git commit</code></pre>
</div></div>
-<div class="paragraph"><p>this second commit would record the changes to <tt>hello.c</tt> and
-<tt>hello.h</tt> as expected.</p></div>
+<div class="paragraph"><p>this second commit would record the changes to <code>hello.c</code> and
+<code>hello.h</code> as expected.</p></div>
<div class="paragraph"><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
@@ -1228,25 +1402,27 @@ and after fixing them manually in your working tree, you would
stage the result as usual with <em>git add</em>:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git status | grep unmerged
+<pre><code>$ git status | grep unmerged
unmerged: hello.c
$ edit hello.c
-$ git add hello.c</tt></pre>
+$ git add hello.c</code></pre>
</div></div>
-<div class="paragraph"><p>After resolving conflicts and staging the result, <tt>git ls-files -u</tt>
+<div class="paragraph"><p>After resolving conflicts and staging the result, <code>git ls-files -u</code>
would stop mentioning the conflicted path. When you are done,
-run <tt>git commit</tt> to finally record the merge:</p></div>
+run <code>git commit</code> to finally record the merge:</p></div>
<div class="listingblock">
<div class="content">
-<pre><tt>$ git commit</tt></pre>
+<pre><code>$ git commit</code></pre>
</div></div>
-<div class="paragraph"><p>As with the case to record your own changes, you can use <tt>-a</tt>
+<div class="paragraph"><p>As with the case to record your own changes, you can use <code>-a</code>
option to save typing. One difference is that during a merge
-resolution, you cannot use <tt>git commit</tt> with pathnames to
+resolution, you cannot use <code>git commit</code> 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></div>
+refuses to run when given pathnames (but see <code>-i</code> option).</p></div>
+</div>
</div>
+<div class="sect1">
<h2 id="_discussion">DISCUSSION</h2>
<div class="sectionbody">
<div class="paragraph"><p>Though not required, it&#8217;s a good idea to begin the commit message
@@ -1295,33 +1471,33 @@ mind.</p></div>
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
- have i18n.commitencoding in <tt>.git/config</tt> file, like this:
+ have i18n.commitencoding in <code>.git/config</code> file, like this:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>[i18n]
- commitencoding = ISO-8859-1</tt></pre>
+<pre><code>[i18n]
+ commitencoding = ISO-8859-1</code></pre>
</div></div>
<div class="paragraph"><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
+of <code>i18n.commitencoding</code> in its <code>encoding</code> 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></div>
</li>
<li>
<p>
<em>git log</em>, <em>git show</em>, <em>git blame</em> and friends look at the
- <tt>encoding</tt> header of a commit object, and try to re-code the
+ <code>encoding</code> header of a commit object, and try to re-code the
log message into UTF-8 unless otherwise specified. You can
specify the desired output encoding with
- <tt>i18n.logoutputencoding</tt> in <tt>.git/config</tt> file, like this:
+ <code>i18n.logoutputencoding</code> in <code>.git/config</code> file, like this:
</p>
<div class="listingblock">
<div class="content">
-<pre><tt>[i18n]
- logoutputencoding = ISO-8859-1</tt></pre>
+<pre><code>[i18n]
+ logoutputencoding = ISO-8859-1</code></pre>
</div></div>
<div class="paragraph"><p>If you do not have this configuration variable, the value of
-<tt>i18n.commitencoding</tt> is used instead.</p></div>
+<code>i18n.commitencoding</code> is used instead.</p></div>
</li>
</ol></div>
<div class="paragraph"><p>Note that we deliberately chose not to re-code the commit log
@@ -1329,6 +1505,8 @@ 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></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_environment_and_configuration_variables">ENVIRONMENT AND CONFIGURATION VARIABLES</h2>
<div class="sectionbody">
<div class="paragraph"><p>The editor used to edit the commit log message will be chosen from the
@@ -1336,29 +1514,35 @@ GIT_EDITOR environment variable, the core.editor configuration variable, the
VISUAL environment variable, or the EDITOR environment variable (in that
order). See <a href="git-var.html">git-var(1)</a> for details.</p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_hooks">HOOKS</h2>
<div class="sectionbody">
-<div class="paragraph"><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
+<div class="paragraph"><p>This command can run <code>commit-msg</code>, <code>prepare-commit-msg</code>, <code>pre-commit</code>,
+and <code>post-commit</code> hooks. See <a href="githooks.html">githooks(5)</a> for more
information.</p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_files">FILES</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
-<tt>$GIT_DIR/COMMIT_EDITMSG</tt>
+<code>$GIT_DIR/COMMIT_EDITMSG</code>
</dt>
<dd>
<p>
This file contains the commit message of a commit in progress.
- If <tt>git commit</tt> exits due to an error before creating a commit,
+ If <code>git commit</code> exits due to an error before creating a commit,
any commit message that has been provided by the user (e.g., in
an editor session) will be available in this file, but will be
- overwritten by the next invocation of <tt>git commit</tt>.
+ overwritten by the next invocation of <code>git commit</code>.
</p>
</dd>
</dl></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph"><p><a href="git-add.html">git-add(1)</a>,
@@ -1367,15 +1551,18 @@ information.</p></div>
<a href="git-merge.html">git-merge(1)</a>,
<a href="git-commit-tree.html">git-commit-tree(1)</a></p></div>
</div>
+</div>
+<div class="sect1">
<h2 id="_git">GIT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Part of the <a href="git.html">git(1)</a> suite</p></div>
</div>
</div>
+</div>
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2012-11-15 13:11:54 PDT
+Last updated 2012-11-15 13:11:54 PST
</div>
</div>
</body>