Autogenerated HTML docs for v1.7.6-396-ge0613
[git/jnareb-git.git] / git-notes.html
blob0eff85ea2ded92dfed34e5c44f1bd854ae3f0810
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6 <meta name="generator" content="AsciiDoc 8.4.5" />
7 <title>git-notes(1)</title>
8 <style type="text/css">
9 /* Debug borders */
10 p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
12 border: 1px solid red;
16 body {
17 margin: 1em 5% 1em 5%;
20 a {
21 color: blue;
22 text-decoration: underline;
24 a:visited {
25 color: fuchsia;
28 em {
29 font-style: italic;
30 color: navy;
33 strong {
34 font-weight: bold;
35 color: #083194;
38 tt {
39 color: navy;
42 h1, h2, h3, h4, h5, h6 {
43 color: #527bbd;
44 font-family: sans-serif;
45 margin-top: 1.2em;
46 margin-bottom: 0.5em;
47 line-height: 1.3;
50 h1, h2, h3 {
51 border-bottom: 2px solid silver;
53 h2 {
54 padding-top: 0.5em;
56 h3 {
57 float: left;
59 h3 + * {
60 clear: left;
63 div.sectionbody {
64 font-family: serif;
65 margin-left: 0;
68 hr {
69 border: 1px solid silver;
72 p {
73 margin-top: 0.5em;
74 margin-bottom: 0.5em;
77 ul, ol, li > p {
78 margin-top: 0;
81 pre {
82 padding: 0;
83 margin: 0;
86 span#author {
87 color: #527bbd;
88 font-family: sans-serif;
89 font-weight: bold;
90 font-size: 1.1em;
92 span#email {
94 span#revnumber, span#revdate, span#revremark {
95 font-family: sans-serif;
98 div#footer {
99 font-family: sans-serif;
100 font-size: small;
101 border-top: 2px solid silver;
102 padding-top: 0.5em;
103 margin-top: 4.0em;
105 div#footer-text {
106 float: left;
107 padding-bottom: 0.5em;
109 div#footer-badges {
110 float: right;
111 padding-bottom: 0.5em;
114 div#preamble {
115 margin-top: 1.5em;
116 margin-bottom: 1.5em;
118 div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
119 div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
120 div.admonitionblock {
121 margin-top: 1.5em;
122 margin-bottom: 1.5em;
124 div.admonitionblock {
125 margin-top: 2.5em;
126 margin-bottom: 2.5em;
129 div.content { /* Block element content. */
130 padding: 0;
133 /* Block element titles. */
134 div.title, caption.title {
135 color: #527bbd;
136 font-family: sans-serif;
137 font-weight: bold;
138 text-align: left;
139 margin-top: 1.0em;
140 margin-bottom: 0.5em;
142 div.title + * {
143 margin-top: 0;
146 td div.title:first-child {
147 margin-top: 0.0em;
149 div.content div.title:first-child {
150 margin-top: 0.0em;
152 div.content + div.title {
153 margin-top: 0.0em;
156 div.sidebarblock > div.content {
157 background: #ffffee;
158 border: 1px solid silver;
159 padding: 0.5em;
162 div.listingblock > div.content {
163 border: 1px solid silver;
164 background: #f4f4f4;
165 padding: 0.5em;
168 div.quoteblock {
169 padding-left: 2.0em;
170 margin-right: 10%;
172 div.quoteblock > div.attribution {
173 padding-top: 0.5em;
174 text-align: right;
177 div.verseblock {
178 padding-left: 2.0em;
179 margin-right: 10%;
181 div.verseblock > div.content {
182 white-space: pre;
184 div.verseblock > div.attribution {
185 padding-top: 0.75em;
186 text-align: left;
188 /* DEPRECATED: Pre version 8.2.7 verse style literal block. */
189 div.verseblock + div.attribution {
190 text-align: left;
193 div.admonitionblock .icon {
194 vertical-align: top;
195 font-size: 1.1em;
196 font-weight: bold;
197 text-decoration: underline;
198 color: #527bbd;
199 padding-right: 0.5em;
201 div.admonitionblock td.content {
202 padding-left: 0.5em;
203 border-left: 2px solid silver;
206 div.exampleblock > div.content {
207 border-left: 2px solid silver;
208 padding: 0.5em;
211 div.imageblock div.content { padding-left: 0; }
212 span.image img { border-style: none; }
213 a.image:visited { color: white; }
215 dl {
216 margin-top: 0.8em;
217 margin-bottom: 0.8em;
219 dt {
220 margin-top: 0.5em;
221 margin-bottom: 0;
222 font-style: normal;
223 color: navy;
225 dd > *:first-child {
226 margin-top: 0.1em;
229 ul, ol {
230 list-style-position: outside;
232 ol.arabic {
233 list-style-type: decimal;
235 ol.loweralpha {
236 list-style-type: lower-alpha;
238 ol.upperalpha {
239 list-style-type: upper-alpha;
241 ol.lowerroman {
242 list-style-type: lower-roman;
244 ol.upperroman {
245 list-style-type: upper-roman;
248 div.compact ul, div.compact ol,
249 div.compact p, div.compact p,
250 div.compact div, div.compact div {
251 margin-top: 0.1em;
252 margin-bottom: 0.1em;
255 div.tableblock > table {
256 border: 3px solid #527bbd;
258 thead {
259 font-family: sans-serif;
260 font-weight: bold;
262 tfoot {
263 font-weight: bold;
265 td > div.verse {
266 white-space: pre;
268 p.table {
269 margin-top: 0;
271 /* Because the table frame attribute is overriden by CSS in most browsers. */
272 div.tableblock > table[frame="void"] {
273 border-style: none;
275 div.tableblock > table[frame="hsides"] {
276 border-left-style: none;
277 border-right-style: none;
279 div.tableblock > table[frame="vsides"] {
280 border-top-style: none;
281 border-bottom-style: none;
285 div.hdlist {
286 margin-top: 0.8em;
287 margin-bottom: 0.8em;
289 div.hdlist tr {
290 padding-bottom: 15px;
292 dt.hdlist1.strong, td.hdlist1.strong {
293 font-weight: bold;
295 td.hdlist1 {
296 vertical-align: top;
297 font-style: normal;
298 padding-right: 0.8em;
299 color: navy;
301 td.hdlist2 {
302 vertical-align: top;
304 div.hdlist.compact tr {
305 margin: 0;
306 padding-bottom: 0;
309 .comment {
310 background: yellow;
313 @media print {
314 div#footer-badges { display: none; }
317 div#toctitle {
318 color: #527bbd;
319 font-family: sans-serif;
320 font-size: 1.1em;
321 font-weight: bold;
322 margin-top: 1.0em;
323 margin-bottom: 0.1em;
326 div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
327 margin-top: 0;
328 margin-bottom: 0;
330 div.toclevel2 {
331 margin-left: 2em;
332 font-size: 0.9em;
334 div.toclevel3 {
335 margin-left: 4em;
336 font-size: 0.9em;
338 div.toclevel4 {
339 margin-left: 6em;
340 font-size: 0.9em;
342 /* Overrides for manpage documents */
343 h1 {
344 padding-top: 0.5em;
345 padding-bottom: 0.5em;
346 border-top: 2px solid silver;
347 border-bottom: 2px solid silver;
349 h2 {
350 border-style: none;
352 div.sectionbody {
353 margin-left: 5%;
356 @media print {
357 div#toc { display: none; }
360 /* Workarounds for IE6's broken and incomplete CSS2. */
362 div.sidebar-content {
363 background: #ffffee;
364 border: 1px solid silver;
365 padding: 0.5em;
367 div.sidebar-title, div.image-title {
368 color: #527bbd;
369 font-family: sans-serif;
370 font-weight: bold;
371 margin-top: 0.0em;
372 margin-bottom: 0.5em;
375 div.listingblock div.content {
376 border: 1px solid silver;
377 background: #f4f4f4;
378 padding: 0.5em;
381 div.quoteblock-attribution {
382 padding-top: 0.5em;
383 text-align: right;
386 div.verseblock-content {
387 white-space: pre;
389 div.verseblock-attribution {
390 padding-top: 0.75em;
391 text-align: left;
394 div.exampleblock-content {
395 border-left: 2px solid silver;
396 padding-left: 0.5em;
399 /* IE6 sets dynamically generated links as visited. */
400 div#toc a:visited { color: blue; }
401 </style>
402 </head>
403 <body>
404 <div id="header">
405 <h1>
406 git-notes(1) Manual Page
407 </h1>
408 <h2>NAME</h2>
409 <div class="sectionbody">
410 <p>git-notes -
411 Add or inspect object notes
412 </p>
413 </div>
414 </div>
415 <h2 id="_synopsis">SYNOPSIS</h2>
416 <div class="sectionbody">
417 <div class="verseblock">
418 <div class="verseblock-content"><em>git notes</em> [list [&lt;object&gt;]]
419 <em>git notes</em> add [-f] [-F &lt;file&gt; | -m &lt;msg&gt; | (-c | -C) &lt;object&gt;] [&lt;object&gt;]
420 <em>git notes</em> copy [-f] ( --stdin | &lt;from-object&gt; &lt;to-object&gt; )
421 <em>git notes</em> append [-F &lt;file&gt; | -m &lt;msg&gt; | (-c | -C) &lt;object&gt;] [&lt;object&gt;]
422 <em>git notes</em> edit [&lt;object&gt;]
423 <em>git notes</em> show [&lt;object&gt;]
424 <em>git notes</em> merge [-v | -q] [-s &lt;strategy&gt; ] &lt;notes_ref&gt;
425 <em>git notes</em> merge --commit [-v | -q]
426 <em>git notes</em> merge --abort [-v | -q]
427 <em>git notes</em> remove [--ignore-missing] [--stdin] [&lt;object&gt;&#8230;]
428 <em>git notes</em> prune [-n | -v]
429 <em>git notes</em> get-ref</div>
430 <div class="verseblock-attribution">
431 </div></div>
432 </div>
433 <h2 id="_description">DESCRIPTION</h2>
434 <div class="sectionbody">
435 <div class="paragraph"><p>Adds, removes, or reads notes attached to objects, without touching
436 the objects themselves.</p></div>
437 <div class="paragraph"><p>By default, notes are saved to and read from <tt>refs/notes/commits</tt>, but
438 this default can be overridden. See the OPTIONS, CONFIGURATION, and
439 ENVIRONMENT sections below. If this ref does not exist, it will be
440 quietly created when it is first needed to store a note.</p></div>
441 <div class="paragraph"><p>A typical use of notes is to supplement a commit message without
442 changing the commit itself. Notes can be shown by <em>git log</em> along with
443 the original commit message. To distinguish these notes from the
444 message stored in the commit object, the notes are indented like the
445 message, after an unindented line saying "Notes (&lt;refname&gt;):" (or
446 "Notes:" for <tt>refs/notes/commits</tt>).</p></div>
447 <div class="paragraph"><p>To change which notes are shown by <em>git log</em>, see the
448 "notes.displayRef" configuration in <a href="git-log.html">git-log(1)</a>.</p></div>
449 <div class="paragraph"><p>See the "notes.rewrite.&lt;command&gt;" configuration for a way to carry
450 notes across commands that rewrite commits.</p></div>
451 </div>
452 <h2 id="_subcommands">SUBCOMMANDS</h2>
453 <div class="sectionbody">
454 <div class="dlist"><dl>
455 <dt class="hdlist1">
456 list
457 </dt>
458 <dd>
460 List the notes object for a given object. If no object is
461 given, show a list of all note objects and the objects they
462 annotate (in the format "&lt;note object&gt; &lt;annotated object&gt;").
463 This is the default subcommand if no subcommand is given.
464 </p>
465 </dd>
466 <dt class="hdlist1">
468 </dt>
469 <dd>
471 Add notes for a given object (defaults to HEAD). Abort if the
472 object already has notes (use <tt>-f</tt> to overwrite existing notes).
473 However, if you&#8217;re using <tt>add</tt> interactively (using an editor
474 to supply the notes contents), then - instead of aborting -
475 the existing notes will be opened in the editor (like the <tt>edit</tt>
476 subcommand).
477 </p>
478 </dd>
479 <dt class="hdlist1">
480 copy
481 </dt>
482 <dd>
484 Copy the notes for the first object onto the second object.
485 Abort if the second object already has notes, or if the first
486 object has none (use -f to overwrite existing notes to the
487 second object). This subcommand is equivalent to:
488 <tt>git notes add [-f] -C $(git notes list &lt;from-object&gt;) &lt;to-object&gt;</tt>
489 </p>
490 <div class="paragraph"><p>In <tt>--stdin</tt> mode, take lines in the format</p></div>
491 <div class="listingblock">
492 <div class="content">
493 <pre><tt>&lt;from-object&gt; SP &lt;to-object&gt; [ SP &lt;rest&gt; ] LF</tt></pre>
494 </div></div>
495 <div class="paragraph"><p>on standard input, and copy the notes from each &lt;from-object&gt; to its
496 corresponding &lt;to-object&gt;. (The optional <tt>&lt;rest&gt;</tt> is ignored so that
497 the command can read the input given to the <tt>post-rewrite</tt> hook.)</p></div>
498 </dd>
499 <dt class="hdlist1">
500 append
501 </dt>
502 <dd>
504 Append to the notes of an existing object (defaults to HEAD).
505 Creates a new notes object if needed.
506 </p>
507 </dd>
508 <dt class="hdlist1">
509 edit
510 </dt>
511 <dd>
513 Edit the notes for a given object (defaults to HEAD).
514 </p>
515 </dd>
516 <dt class="hdlist1">
517 show
518 </dt>
519 <dd>
521 Show the notes for a given object (defaults to HEAD).
522 </p>
523 </dd>
524 <dt class="hdlist1">
525 merge
526 </dt>
527 <dd>
529 Merge the given notes ref into the current notes ref.
530 This will try to merge the changes made by the given
531 notes ref (called "remote") since the merge-base (if
532 any) into the current notes ref (called "local").
533 </p>
534 <div class="paragraph"><p>If conflicts arise and a strategy for automatically resolving
535 conflicting notes (see the -s/--strategy option) is not given,
536 the "manual" resolver is used. This resolver checks out the
537 conflicting notes in a special worktree (<tt>.git/NOTES_MERGE_WORKTREE</tt>),
538 and instructs the user to manually resolve the conflicts there.
539 When done, the user can either finalize the merge with
540 <em>git notes merge --commit</em>, or abort the merge with
541 <em>git notes merge --abort</em>.</p></div>
542 </dd>
543 <dt class="hdlist1">
544 remove
545 </dt>
546 <dd>
548 Remove the notes for given objects (defaults to HEAD). When
549 giving zero or one object from the command line, this is
550 equivalent to specifying an empty note message to
551 the <tt>edit</tt> subcommand.
552 </p>
553 </dd>
554 <dt class="hdlist1">
555 prune
556 </dt>
557 <dd>
559 Remove all notes for non-existing/unreachable objects.
560 </p>
561 </dd>
562 <dt class="hdlist1">
563 get-ref
564 </dt>
565 <dd>
567 Print the current notes ref. This provides an easy way to
568 retrieve the current notes ref (e.g. from scripts).
569 </p>
570 </dd>
571 </dl></div>
572 </div>
573 <h2 id="_options">OPTIONS</h2>
574 <div class="sectionbody">
575 <div class="dlist"><dl>
576 <dt class="hdlist1">
578 </dt>
579 <dt class="hdlist1">
580 --force
581 </dt>
582 <dd>
584 When adding notes to an object that already has notes,
585 overwrite the existing notes (instead of aborting).
586 </p>
587 </dd>
588 <dt class="hdlist1">
589 -m &lt;msg&gt;
590 </dt>
591 <dt class="hdlist1">
592 --message=&lt;msg&gt;
593 </dt>
594 <dd>
596 Use the given note message (instead of prompting).
597 If multiple <tt>-m</tt> options are given, their values
598 are concatenated as separate paragraphs.
599 Lines starting with <tt>#</tt> and empty lines other than a
600 single line between paragraphs will be stripped out.
601 </p>
602 </dd>
603 <dt class="hdlist1">
604 -F &lt;file&gt;
605 </dt>
606 <dt class="hdlist1">
607 --file=&lt;file&gt;
608 </dt>
609 <dd>
611 Take the note message from the given file. Use <em>-</em> to
612 read the note message from the standard input.
613 Lines starting with <tt>#</tt> and empty lines other than a
614 single line between paragraphs will be stripped out.
615 </p>
616 </dd>
617 <dt class="hdlist1">
618 -C &lt;object&gt;
619 </dt>
620 <dt class="hdlist1">
621 --reuse-message=&lt;object&gt;
622 </dt>
623 <dd>
625 Take the note message from the given blob object (for
626 example, another note).
627 </p>
628 </dd>
629 <dt class="hdlist1">
630 -c &lt;object&gt;
631 </dt>
632 <dt class="hdlist1">
633 --reedit-message=&lt;object&gt;
634 </dt>
635 <dd>
637 Like <em>-C</em>, but with <em>-c</em> the editor is invoked, so that
638 the user can further edit the note message.
639 </p>
640 </dd>
641 <dt class="hdlist1">
642 --ref &lt;ref&gt;
643 </dt>
644 <dd>
646 Manipulate the notes tree in &lt;ref&gt;. This overrides
647 <em>GIT_NOTES_REF</em> and the "core.notesRef" configuration. The ref
648 is taken to be in <tt>refs/notes/</tt> if it is not qualified.
649 </p>
650 </dd>
651 <dt class="hdlist1">
652 --ignore-missing
653 </dt>
654 <dd>
656 Do not consider it an error to request removing notes from an
657 object that does not have notes attached to it.
658 </p>
659 </dd>
660 <dt class="hdlist1">
661 --stdin
662 </dt>
663 <dd>
665 Also read the object names to remove notes from from the standard
666 input (there is no reason you cannot combine this with object
667 names from the command line).
668 </p>
669 </dd>
670 <dt class="hdlist1">
672 </dt>
673 <dt class="hdlist1">
674 --dry-run
675 </dt>
676 <dd>
678 Do not remove anything; just report the object names whose notes
679 would be removed.
680 </p>
681 </dd>
682 <dt class="hdlist1">
683 -s &lt;strategy&gt;
684 </dt>
685 <dt class="hdlist1">
686 --strategy=&lt;strategy&gt;
687 </dt>
688 <dd>
690 When merging notes, resolve notes conflicts using the given
691 strategy. The following strategies are recognized: "manual"
692 (default), "ours", "theirs", "union" and "cat_sort_uniq".
693 See the "NOTES MERGE STRATEGIES" section below for more
694 information on each notes merge strategy.
695 </p>
696 </dd>
697 <dt class="hdlist1">
698 --commit
699 </dt>
700 <dd>
702 Finalize an in-progress <em>git notes merge</em>. Use this option
703 when you have resolved the conflicts that <em>git notes merge</em>
704 stored in .git/NOTES_MERGE_WORKTREE. This amends the partial
705 merge commit created by <em>git notes merge</em> (stored in
706 .git/NOTES_MERGE_PARTIAL) by adding the notes in
707 .git/NOTES_MERGE_WORKTREE. The notes ref stored in the
708 .git/NOTES_MERGE_REF symref is updated to the resulting commit.
709 </p>
710 </dd>
711 <dt class="hdlist1">
712 --abort
713 </dt>
714 <dd>
716 Abort/reset a in-progress <em>git notes merge</em>, i.e. a notes merge
717 with conflicts. This simply removes all files related to the
718 notes merge.
719 </p>
720 </dd>
721 <dt class="hdlist1">
723 </dt>
724 <dt class="hdlist1">
725 --quiet
726 </dt>
727 <dd>
729 When merging notes, operate quietly.
730 </p>
731 </dd>
732 <dt class="hdlist1">
734 </dt>
735 <dt class="hdlist1">
736 --verbose
737 </dt>
738 <dd>
740 When merging notes, be more verbose.
741 When pruning notes, report all object names whose notes are
742 removed.
743 </p>
744 </dd>
745 </dl></div>
746 </div>
747 <h2 id="_discussion">DISCUSSION</h2>
748 <div class="sectionbody">
749 <div class="paragraph"><p>Commit notes are blobs containing extra information about an object
750 (usually information to supplement a commit&#8217;s message). These blobs
751 are taken from notes refs. A notes ref is usually a branch which
752 contains "files" whose paths are the object names for the objects
753 they describe, with some directory separators included for performance
754 reasons <br />[Permitted pathnames have the form
755 <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
756 names of two hexadecimal digits each followed by a filename with the
757 rest of the object ID.]<br />.</p></div>
758 <div class="paragraph"><p>Every notes change creates a new commit at the specified notes ref.
759 You can therefore inspect the history of the notes by invoking, e.g.,
760 <tt>git log -p notes/commits</tt>. Currently the commit message only records
761 which operation triggered the update, and the commit authorship is
762 determined according to the usual rules (see <a href="git-commit.html">git-commit(1)</a>).
763 These details may change in the future.</p></div>
764 <div class="paragraph"><p>It is also permitted for a notes ref to point directly to a tree
765 object, in which case the history of the notes can be read with
766 <tt>git log -p -g &lt;refname&gt;</tt>.</p></div>
767 </div>
768 <h2 id="_notes_merge_strategies">NOTES MERGE STRATEGIES</h2>
769 <div class="sectionbody">
770 <div class="paragraph"><p>The default notes merge strategy is "manual", which checks out
771 conflicting notes in a special work tree for resolving notes conflicts
772 (<tt>.git/NOTES_MERGE_WORKTREE</tt>), and instructs the user to resolve the
773 conflicts in that work tree.
774 When done, the user can either finalize the merge with
775 <em>git notes merge --commit</em>, or abort the merge with
776 <em>git notes merge --abort</em>.</p></div>
777 <div class="paragraph"><p>"ours" automatically resolves conflicting notes in favor of the local
778 version (i.e. the current notes ref).</p></div>
779 <div class="paragraph"><p>"theirs" automatically resolves notes conflicts in favor of the remote
780 version (i.e. the given notes ref being merged into the current notes
781 ref).</p></div>
782 <div class="paragraph"><p>"union" automatically resolves notes conflicts by concatenating the
783 local and remote versions.</p></div>
784 <div class="paragraph"><p>"cat_sort_uniq" is similar to "union", but in addition to concatenating
785 the local and remote versions, this strategy also sorts the resulting
786 lines, and removes duplicate lines from the result. This is equivalent
787 to applying the "cat | sort | uniq" shell pipeline to the local and
788 remote versions. This strategy is useful if the notes follow a line-based
789 format where one wants to avoid duplicated lines in the merge result.
790 Note that if either the local or remote version contain duplicate lines
791 prior to the merge, these will also be removed by this notes merge
792 strategy.</p></div>
793 </div>
794 <h2 id="_examples">EXAMPLES</h2>
795 <div class="sectionbody">
796 <div class="paragraph"><p>You can use notes to add annotations with information that was not
797 available at the time a commit was written.</p></div>
798 <div class="listingblock">
799 <div class="content">
800 <pre><tt>$ git notes add -m 'Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;' 72a144e2
801 $ git show -s 72a144e
802 [...]
803 Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
805 Notes:
806 Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;</tt></pre>
807 </div></div>
808 <div class="paragraph"><p>In principle, a note is a regular Git blob, and any kind of
809 (non-)format is accepted. You can binary-safely create notes from
810 arbitrary files using <em>git hash-object</em>:</p></div>
811 <div class="listingblock">
812 <div class="content">
813 <pre><tt>$ cc *.c
814 $ blob=$(git hash-object -w a.out)
815 $ git notes --ref=built add -C "$blob" HEAD</tt></pre>
816 </div></div>
817 <div class="paragraph"><p>Of course, it doesn&#8217;t make much sense to display non-text-format notes
818 with <em>git log</em>, so if you use such notes, you&#8217;ll probably need to write
819 some special-purpose tools to do something useful with them.</p></div>
820 </div>
821 <h2 id="_configuration">CONFIGURATION</h2>
822 <div class="sectionbody">
823 <div class="dlist"><dl>
824 <dt class="hdlist1">
825 core.notesRef
826 </dt>
827 <dd>
829 Notes ref to read and manipulate instead of
830 <tt>refs/notes/commits</tt>. Must be an unabbreviated ref name.
831 This setting can be overridden through the environment and
832 command line.
833 </p>
834 </dd>
835 <dt class="hdlist1">
836 notes.displayRef
837 </dt>
838 <dd>
840 Which ref (or refs, if a glob or specified more than once), in
841 addition to the default set by <tt>core.notesRef</tt> or
842 <em>GIT_NOTES_REF</em>, to read notes from when showing commit
843 messages with the <em>git log</em> family of commands.
844 This setting can be overridden on the command line or by the
845 <em>GIT_NOTES_DISPLAY_REF</em> environment variable.
846 See <a href="git-log.html">git-log(1)</a>.
847 </p>
848 </dd>
849 <dt class="hdlist1">
850 notes.rewrite.&lt;command&gt;
851 </dt>
852 <dd>
854 When rewriting commits with &lt;command&gt; (currently <tt>amend</tt> or
855 <tt>rebase</tt>), if this variable is <tt>false</tt>, git will not copy
856 notes from the original to the rewritten commit. Defaults to
857 <tt>true</tt>. See also "<tt>notes.rewriteRef</tt>" below.
858 </p>
859 <div class="paragraph"><p>This setting can be overridden by the <em>GIT_NOTES_REWRITE_REF</em>
860 environment variable.</p></div>
861 </dd>
862 <dt class="hdlist1">
863 notes.rewriteMode
864 </dt>
865 <dd>
867 When copying notes during a rewrite, what to do if the target
868 commit already has a note. Must be one of <tt>overwrite</tt>,
869 <tt>concatenate</tt>, and <tt>ignore</tt>. Defaults to <tt>concatenate</tt>.
870 </p>
871 <div class="paragraph"><p>This setting can be overridden with the <tt>GIT_NOTES_REWRITE_MODE</tt>
872 environment variable.</p></div>
873 </dd>
874 <dt class="hdlist1">
875 notes.rewriteRef
876 </dt>
877 <dd>
879 When copying notes during a rewrite, specifies the (fully
880 qualified) ref whose notes should be copied. May be a glob,
881 in which case notes in all matching refs will be copied. You
882 may also specify this configuration several times.
883 </p>
884 <div class="paragraph"><p>Does not have a default value; you must configure this variable to
885 enable note rewriting.</p></div>
886 <div class="paragraph"><p>Can be overridden with the <em>GIT_NOTES_REWRITE_REF</em> environment variable.</p></div>
887 </dd>
888 </dl></div>
889 </div>
890 <h2 id="_environment">ENVIRONMENT</h2>
891 <div class="sectionbody">
892 <div class="dlist"><dl>
893 <dt class="hdlist1">
894 <em>GIT_NOTES_REF</em>
895 </dt>
896 <dd>
898 Which ref to manipulate notes from, instead of <tt>refs/notes/commits</tt>.
899 This overrides the <tt>core.notesRef</tt> setting.
900 </p>
901 </dd>
902 <dt class="hdlist1">
903 <em>GIT_NOTES_DISPLAY_REF</em>
904 </dt>
905 <dd>
907 Colon-delimited list of refs or globs indicating which refs,
908 in addition to the default from <tt>core.notesRef</tt> or
909 <em>GIT_NOTES_REF</em>, to read notes from when showing commit
910 messages.
911 This overrides the <tt>notes.displayRef</tt> setting.
912 </p>
913 <div class="paragraph"><p>A warning will be issued for refs that do not exist, but a glob that
914 does not match any refs is silently ignored.</p></div>
915 </dd>
916 <dt class="hdlist1">
917 <em>GIT_NOTES_REWRITE_MODE</em>
918 </dt>
919 <dd>
921 When copying notes during a rewrite, what to do if the target
922 commit already has a note.
923 Must be one of <tt>overwrite</tt>, <tt>concatenate</tt>, and <tt>ignore</tt>.
924 This overrides the <tt>core.rewriteMode</tt> setting.
925 </p>
926 </dd>
927 <dt class="hdlist1">
928 <em>GIT_NOTES_REWRITE_REF</em>
929 </dt>
930 <dd>
932 When rewriting commits, which notes to copy from the original
933 to the rewritten commit. Must be a colon-delimited list of
934 refs or globs.
935 </p>
936 <div class="paragraph"><p>If not set in the environment, the list of notes to copy depends
937 on the <tt>notes.rewrite.&lt;command&gt;</tt> and <tt>notes.rewriteRef</tt> settings.</p></div>
938 </dd>
939 </dl></div>
940 </div>
941 <h2 id="_author">Author</h2>
942 <div class="sectionbody">
943 <div class="paragraph"><p>Written by Johannes Schindelin &lt;<a href="mailto:johannes.schindelin@gmx.de">johannes.schindelin@gmx.de</a>&gt; and
944 Johan Herland &lt;<a href="mailto:johan@herland.net">johan@herland.net</a>&gt;</p></div>
945 </div>
946 <h2 id="_documentation">Documentation</h2>
947 <div class="sectionbody">
948 <div class="paragraph"><p>Documentation by Johannes Schindelin and Johan Herland</p></div>
949 </div>
950 <h2 id="_git">GIT</h2>
951 <div class="sectionbody">
952 <div class="paragraph"><p>Part of the <a href="git.html">git(7)</a> suite</p></div>
953 </div>
954 <div id="footer">
955 <div id="footer-text">
956 Last updated 2011-05-30 08:13:19 UTC
957 </div>
958 </div>
959 </body>
960 </html>