Sophie

Sophie

distrib > Fedora > 13 > x86_64 > media > updates > by-pkgid > 6d2efdff460e67eb6edffadebeb04e55 > files > 424

git-1.7.3.4-1.fc13.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
    "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.4.5" />
<title>git-notes(1)</title>
<style type="text/css">
/* Debug borders */
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
/*
  border: 1px solid red;
*/
}

body {
  margin: 1em 5% 1em 5%;
}

a {
  color: blue;
  text-decoration: underline;
}
a:visited {
  color: fuchsia;
}

em {
  font-style: italic;
  color: navy;
}

strong {
  font-weight: bold;
  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;
}

h1, h2, h3 {
  border-bottom: 2px solid silver;
}
h2 {
  padding-top: 0.5em;
}
h3 {
  float: left;
}
h3 + * {
  clear: left;
}

div.sectionbody {
  font-family: serif;
  margin-left: 0;
}

hr {
  border: 1px solid silver;
}

p {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

ul, ol, li > p {
  margin-top: 0;
}

pre {
  padding: 0;
  margin: 0;
}

span#author {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1.1em;
}
span#email {
}
span#revnumber, span#revdate, span#revremark {
  font-family: sans-serif;
}

div#footer {
  font-family: sans-serif;
  font-size: small;
  border-top: 2px solid silver;
  padding-top: 0.5em;
  margin-top: 4.0em;
}
div#footer-text {
  float: left;
  padding-bottom: 0.5em;
}
div#footer-badges {
  float: right;
  padding-bottom: 0.5em;
}

div#preamble {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
div.admonitionblock {
  margin-top: 1.5em;
  margin-bottom: 1.5em;
}
div.admonitionblock {
  margin-top: 2.5em;
  margin-bottom: 2.5em;
}

div.content { /* Block element content. */
  padding: 0;
}

/* Block element titles. */
div.title, caption.title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  text-align: left;
  margin-top: 1.0em;
  margin-bottom: 0.5em;
}
div.title + * {
  margin-top: 0;
}

td div.title:first-child {
  margin-top: 0.0em;
}
div.content div.title:first-child {
  margin-top: 0.0em;
}
div.content + div.title {
  margin-top: 0.0em;
}

div.sidebarblock > div.content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}

div.listingblock > div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock {
  padding-left: 2.0em;
  margin-right: 10%;
}
div.quoteblock > div.attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock {
  padding-left: 2.0em;
  margin-right: 10%;
}
div.verseblock > div.content {
  white-space: pre;
}
div.verseblock > div.attribution {
  padding-top: 0.75em;
  text-align: left;
}
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
div.verseblock + div.attribution {
  text-align: left;
}

div.admonitionblock .icon {
  vertical-align: top;
  font-size: 1.1em;
  font-weight: bold;
  text-decoration: underline;
  color: #527bbd;
  padding-right: 0.5em;
}
div.admonitionblock td.content {
  padding-left: 0.5em;
  border-left: 2px solid silver;
}

div.exampleblock > div.content {
  border-left: 2px solid silver;
  padding: 0.5em;
}

div.imageblock div.content { padding-left: 0; }
span.image img { border-style: none; }
a.image:visited { color: white; }

dl {
  margin-top: 0.8em;
  margin-bottom: 0.8em;
}
dt {
  margin-top: 0.5em;
  margin-bottom: 0;
  font-style: normal;
  color: navy;
}
dd > *:first-child {
  margin-top: 0.1em;
}

ul, ol {
    list-style-position: outside;
}
ol.arabic {
  list-style-type: decimal;
}
ol.loweralpha {
  list-style-type: lower-alpha;
}
ol.upperalpha {
  list-style-type: upper-alpha;
}
ol.lowerroman {
  list-style-type: lower-roman;
}
ol.upperroman {
  list-style-type: upper-roman;
}

div.compact ul, div.compact ol,
div.compact p, div.compact p,
div.compact div, div.compact div {
  margin-top: 0.1em;
  margin-bottom: 0.1em;
}

div.tableblock > table {
  border: 3px solid #527bbd;
}
thead {
  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;
  margin-bottom: 0.8em;
}
div.hdlist tr {
  padding-bottom: 15px;
}
dt.hdlist1.strong, td.hdlist1.strong {
  font-weight: bold;
}
td.hdlist1 {
  vertical-align: top;
  font-style: normal;
  padding-right: 0.8em;
  color: navy;
}
td.hdlist2 {
  vertical-align: top;
}
div.hdlist.compact tr {
  margin: 0;
  padding-bottom: 0;
}

.comment {
  background: yellow;
}

@media print {
  div#footer-badges { display: none; }
}

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;
}
/* Overrides for manpage documents */
h1 {
  padding-top: 0.5em;
  padding-bottom: 0.5em;
  border-top: 2px solid silver;
  border-bottom: 2px solid silver;
}
h2 {
  border-style: none;
}
div.sectionbody {
  margin-left: 5%;
}

@media print {
  div#toc { display: none; }
}

/* Workarounds for IE6's broken and incomplete CSS2. */

div.sidebar-content {
  background: #ffffee;
  border: 1px solid silver;
  padding: 0.5em;
}
div.sidebar-title, div.image-title {
  color: #527bbd;
  font-family: sans-serif;
  font-weight: bold;
  margin-top: 0.0em;
  margin-bottom: 0.5em;
}

div.listingblock div.content {
  border: 1px solid silver;
  background: #f4f4f4;
  padding: 0.5em;
}

div.quoteblock-attribution {
  padding-top: 0.5em;
  text-align: right;
}

div.verseblock-content {
  white-space: pre;
}
div.verseblock-attribution {
  padding-top: 0.75em;
  text-align: left;
}

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>
</head>
<body>
<div id="header">
<h1>
git-notes(1) Manual Page
</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>git-notes -
   Add or inspect object notes
</p>
</div>
</div>
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<div class="verseblock-content"><em>git notes</em> [list [&lt;object&gt;]]
<em>git notes</em> add [-f] [-F &lt;file&gt; | -m &lt;msg&gt; | (-c | -C) &lt;object&gt;] [&lt;object&gt;]
<em>git notes</em> copy [-f] ( --stdin | &lt;from-object&gt; &lt;to-object&gt; )
<em>git notes</em> append [-F &lt;file&gt; | -m &lt;msg&gt; | (-c | -C) &lt;object&gt;] [&lt;object&gt;]
<em>git notes</em> edit [&lt;object&gt;]
<em>git notes</em> show [&lt;object&gt;]
<em>git notes</em> remove [&lt;object&gt;]
<em>git notes</em> prune [-n | -v]</div>
<div class="verseblock-attribution">
</div></div>
</div>
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph"><p>Adds, removes, or reads notes attached to objects, without touching
the objects themselves.</p></div>
<div class="paragraph"><p>By default, notes are saved to and read from <tt>refs/notes/commits</tt>, but
this default can be overridden.  See the OPTIONS, CONFIGURATION, and
ENVIRONMENT sections below.  If this ref does not exist, it will be
quietly created when it is first needed to store a note.</p></div>
<div class="paragraph"><p>A typical use of notes is to supplement a commit message without
changing the commit itself. Notes can be shown by <em>git log</em> along with
the original commit message. To distinguish these notes from the
message stored in the commit object, the notes are indented like the
message, after an unindented line saying "Notes (&lt;refname&gt;):" (or
"Notes:" for <tt>refs/notes/commits</tt>).</p></div>
<div class="paragraph"><p>To change which notes are shown by <em>git log</em>, see the
"notes.displayRef" configuration in <a href="git-log.html">git-log(1)</a>.</p></div>
<div class="paragraph"><p>See the "notes.rewrite.&lt;command&gt;" configuration for a way to carry
notes across commands that rewrite commits.</p></div>
</div>
<h2 id="_subcommands">SUBCOMMANDS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
list
</dt>
<dd>
<p>
        List the notes object for a given object. If no object is
        given, show a list of all note objects and the objects they
        annotate (in the format "&lt;note object&gt; &lt;annotated object&gt;").
        This is the default subcommand if no subcommand is given.
</p>
</dd>
<dt class="hdlist1">
add
</dt>
<dd>
<p>
        Add notes for a given object (defaults to HEAD). Abort if the
        object already has notes (use <tt>-f</tt> to overwrite an
        existing note).
</p>
</dd>
<dt class="hdlist1">
copy
</dt>
<dd>
<p>
        Copy the notes for the first object onto the second object.
        Abort if the second object already has notes, or if the first
        object has none (use -f to overwrite existing notes to the
        second object). This subcommand is equivalent to:
        <tt>git notes add [-f] -C $(git notes list &lt;from-object&gt;) &lt;to-object&gt;</tt>
</p>
<div class="paragraph"><p>In <tt>--stdin</tt> mode, take lines in the format</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>&lt;from-object&gt; SP &lt;to-object&gt; [ SP &lt;rest&gt; ] LF</tt></pre>
</div></div>
<div class="paragraph"><p>on standard input, and copy the notes from each &lt;from-object&gt; to its
corresponding &lt;to-object&gt;.  (The optional <tt>&lt;rest&gt;</tt> is ignored so that
the command can read the input given to the <tt>post-rewrite</tt> hook.)</p></div>
</dd>
<dt class="hdlist1">
append
</dt>
<dd>
<p>
        Append to the notes of an existing object (defaults to HEAD).
        Creates a new notes object if needed.
</p>
</dd>
<dt class="hdlist1">
edit
</dt>
<dd>
<p>
        Edit the notes for a given object (defaults to HEAD).
</p>
</dd>
<dt class="hdlist1">
show
</dt>
<dd>
<p>
        Show the notes for a given object (defaults to HEAD).
</p>
</dd>
<dt class="hdlist1">
remove
</dt>
<dd>
<p>
        Remove the notes for a given object (defaults to HEAD).
        This is equivalent to specifying an empty note message to
        the <tt>edit</tt> subcommand.
</p>
</dd>
<dt class="hdlist1">
prune
</dt>
<dd>
<p>
        Remove all notes for non-existing/unreachable objects.
</p>
</dd>
</dl></div>
</div>
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
-f
</dt>
<dt class="hdlist1">
--force
</dt>
<dd>
<p>
        When adding notes to an object that already has notes,
        overwrite the existing notes (instead of aborting).
</p>
</dd>
<dt class="hdlist1">
-m &lt;msg&gt;
</dt>
<dt class="hdlist1">
--message=&lt;msg&gt;
</dt>
<dd>
<p>
        Use the given note message (instead of prompting).
        If multiple <tt>-m</tt> options are given, their values
        are concatenated as separate paragraphs.
        Lines starting with <tt>#</tt> and empty lines other than a
        single line between paragraphs will be stripped out.
</p>
</dd>
<dt class="hdlist1">
-F &lt;file&gt;
</dt>
<dt class="hdlist1">
--file=&lt;file&gt;
</dt>
<dd>
<p>
        Take the note message from the given file.  Use <em>-</em> to
        read the note message from the standard input.
        Lines starting with <tt>#</tt> and empty lines other than a
        single line between paragraphs will be stripped out.
</p>
</dd>
<dt class="hdlist1">
-C &lt;object&gt;
</dt>
<dt class="hdlist1">
--reuse-message=&lt;object&gt;
</dt>
<dd>
<p>
        Take the note message from the given blob object (for
        example, another note).
</p>
</dd>
<dt class="hdlist1">
-c &lt;object&gt;
</dt>
<dt class="hdlist1">
--reedit-message=&lt;object&gt;
</dt>
<dd>
<p>
        Like <em>-C</em>, but with <em>-c</em> the editor is invoked, so that
        the user can further edit the note message.
</p>
</dd>
<dt class="hdlist1">
--ref &lt;ref&gt;
</dt>
<dd>
<p>
        Manipulate the notes tree in &lt;ref&gt;.  This overrides
        <em>GIT_NOTES_REF</em> and the "core.notesRef" configuration.  The ref
        is taken to be in <tt>refs/notes/</tt> if it is not qualified.
</p>
</dd>
<dt class="hdlist1">
-n
</dt>
<dt class="hdlist1">
--dry-run
</dt>
<dd>
<p>
        Do not remove anything; just report the object names whose notes
        would be removed.
</p>
</dd>
<dt class="hdlist1">
-v
</dt>
<dt class="hdlist1">
--verbose
</dt>
<dd>
<p>
        Report all object names whose notes are removed.
</p>
</dd>
</dl></div>
</div>
<h2 id="_discussion">DISCUSSION</h2>
<div class="sectionbody">
<div class="paragraph"><p>Commit notes are blobs containing extra information about an object
(usually information to supplement a commit&#8217;s message).  These blobs
are taken from notes refs.  A notes ref is usually a branch which
contains "files" whose paths are the object names for the objects
they describe, with some directory separators included for performance
reasons <br />[Permitted pathnames have the form
<em>ab</em><tt>/</tt><em>cd</em><tt>/</tt><em>ef</em><tt>/</tt><em>&#8230;</em><tt>/</tt><em>abcdef&#8230;</em>: a sequence of directory
names of two hexadecimal digits each followed by a filename with the
rest of the object ID.]<br />.</p></div>
<div class="paragraph"><p>Every notes change creates a new commit at the specified notes ref.
You can therefore inspect the history of the notes by invoking, e.g.,
<tt>git log -p notes/commits</tt>.  Currently the commit message only records
which operation triggered the update, and the commit authorship is
determined according to the usual rules (see <a href="git-commit.html">git-commit(1)</a>).
These details may change in the future.</p></div>
<div class="paragraph"><p>It is also permitted for a notes ref to point directly to a tree
object, in which case the history of the notes can be read with
<tt>git log -p -g &lt;refname&gt;</tt>.</p></div>
</div>
<h2 id="_examples">EXAMPLES</h2>
<div class="sectionbody">
<div class="paragraph"><p>You can use notes to add annotations with information that was not
available at the time a commit was written.</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ git notes add -m 'Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;' 72a144e2
$ git show -s 72a144e
[...]
    Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;

Notes:
    Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;</tt></pre>
</div></div>
<div class="paragraph"><p>In principle, a note is a regular Git blob, and any kind of
(non-)format is accepted.  You can binary-safely create notes from
arbitrary files using <em>git hash-object</em>:</p></div>
<div class="listingblock">
<div class="content">
<pre><tt>$ cc *.c
$ blob=$(git hash-object -w a.out)
$ git notes --ref=built add -C "$blob" HEAD</tt></pre>
</div></div>
<div class="paragraph"><p>Of course, it doesn&#8217;t make much sense to display non-text-format notes
with <em>git log</em>, so if you use such notes, you&#8217;ll probably need to write
some special-purpose tools to do something useful with them.</p></div>
</div>
<h2 id="_configuration">CONFIGURATION</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
core.notesRef
</dt>
<dd>
<p>
        Notes ref to read and manipulate instead of
        <tt>refs/notes/commits</tt>.  Must be an unabbreviated ref name.
        This setting can be overridden through the environment and
        command line.
</p>
</dd>
<dt class="hdlist1">
notes.displayRef
</dt>
<dd>
<p>
        Which ref (or refs, if a glob or specified more than once), in
        addition to the default set by <tt>core.notesRef</tt> or
        <em>GIT_NOTES_REF</em>, to read notes from when showing commit
        messages with the <em>git log</em> family of commands.
        This setting can be overridden on the command line or by the
        <em>GIT_NOTES_DISPLAY_REF</em> environment variable.
        See <a href="git-log.html">git-log(1)</a>.
</p>
</dd>
<dt class="hdlist1">
notes.rewrite.&lt;command&gt;
</dt>
<dd>
<p>
        When rewriting commits with &lt;command&gt; (currently <tt>amend</tt> or
        <tt>rebase</tt>), if this variable is <tt>false</tt>, git will not copy
        notes from the original to the rewritten commit.  Defaults to
        <tt>true</tt>.  See also "<tt>notes.rewriteRef</tt>" below.
</p>
<div class="paragraph"><p>This setting can be overridden by the <em>GIT_NOTES_REWRITE_REF</em>
environment variable.</p></div>
</dd>
<dt class="hdlist1">
notes.rewriteMode
</dt>
<dd>
<p>
        When copying notes during a rewrite, what to do if the target
        commit already has a note.  Must be one of <tt>overwrite</tt>,
        <tt>concatenate</tt>, and <tt>ignore</tt>.  Defaults to <tt>concatenate</tt>.
</p>
<div class="paragraph"><p>This setting can be overridden with the <tt>GIT_NOTES_REWRITE_MODE</tt>
environment variable.</p></div>
</dd>
<dt class="hdlist1">
notes.rewriteRef
</dt>
<dd>
<p>
        When copying notes during a rewrite, specifies the (fully
        qualified) ref whose notes should be copied.  May be a glob,
        in which case notes in all matching refs will be copied.  You
        may also specify this configuration several times.
</p>
<div class="paragraph"><p>Does not have a default value; you must configure this variable to
enable note rewriting.</p></div>
<div class="paragraph"><p>Can be overridden with the <em>GIT_NOTES_REWRITE_REF</em> environment variable.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_environment">ENVIRONMENT</h2>
<div class="sectionbody">
<div class="dlist"><dl>
<dt class="hdlist1">
<em>GIT_NOTES_REF</em>
</dt>
<dd>
<p>
        Which ref to manipulate notes from, instead of <tt>refs/notes/commits</tt>.
        This overrides the <tt>core.notesRef</tt> setting.
</p>
</dd>
<dt class="hdlist1">
<em>GIT_NOTES_DISPLAY_REF</em>
</dt>
<dd>
<p>
        Colon-delimited list of refs or globs indicating which refs,
        in addition to the default from <tt>core.notesRef</tt> or
        <em>GIT_NOTES_REF</em>, to read notes from when showing commit
        messages.
        This overrides the <tt>notes.displayRef</tt> setting.
</p>
<div class="paragraph"><p>A warning will be issued for refs that do not exist, but a glob that
does not match any refs is silently ignored.</p></div>
</dd>
<dt class="hdlist1">
<em>GIT_NOTES_REWRITE_MODE</em>
</dt>
<dd>
<p>
        When copying notes during a rewrite, what to do if the target
        commit already has a note.
        Must be one of <tt>overwrite</tt>, <tt>concatenate</tt>, and <tt>ignore</tt>.
        This overrides the <tt>core.rewriteMode</tt> setting.
</p>
</dd>
<dt class="hdlist1">
<em>GIT_NOTES_REWRITE_REF</em>
</dt>
<dd>
<p>
        When rewriting commits, which notes to copy from the original
        to the rewritten commit.  Must be a colon-delimited list of
        refs or globs.
</p>
<div class="paragraph"><p>If not set in the environment, the list of notes to copy depends
on the <tt>notes.rewrite.&lt;command&gt;</tt> and <tt>notes.rewriteRef</tt> settings.</p></div>
</dd>
</dl></div>
</div>
<h2 id="_author">Author</h2>
<div class="sectionbody">
<div class="paragraph"><p>Written by Johannes Schindelin &lt;<a href="mailto:johannes.schindelin@gmx.de">johannes.schindelin@gmx.de</a>&gt; and
Johan Herland &lt;<a href="mailto:johan@herland.net">johan@herland.net</a>&gt;</p></div>
</div>
<h2 id="_documentation">Documentation</h2>
<div class="sectionbody">
<div class="paragraph"><p>Documentation by Johannes Schindelin and Johan Herland</p></div>
</div>
<h2 id="_git">GIT</h2>
<div class="sectionbody">
<div class="paragraph"><p>Part of the <a href="git.html">git(7)</a> suite</p></div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2010-12-16 02:52:11 UTC
</div>
</div>
</body>
</html>