Autogenerated HTML docs for v1.7.4-rc2-20-g8c0db6
[git/jnareb-git.git] / git-notes.html
blob850dff9be6fc286e2492da17030a36c60ff1bfa6
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 [&lt;object&gt;]
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 an
473 existing note).
474 </p>
475 </dd>
476 <dt class="hdlist1">
477 copy
478 </dt>
479 <dd>
481 Copy the notes for the first object onto the second object.
482 Abort if the second object already has notes, or if the first
483 object has none (use -f to overwrite existing notes to the
484 second object). This subcommand is equivalent to:
485 <tt>git notes add [-f] -C $(git notes list &lt;from-object&gt;) &lt;to-object&gt;</tt>
486 </p>
487 <div class="paragraph"><p>In <tt>--stdin</tt> mode, take lines in the format</p></div>
488 <div class="listingblock">
489 <div class="content">
490 <pre><tt>&lt;from-object&gt; SP &lt;to-object&gt; [ SP &lt;rest&gt; ] LF</tt></pre>
491 </div></div>
492 <div class="paragraph"><p>on standard input, and copy the notes from each &lt;from-object&gt; to its
493 corresponding &lt;to-object&gt;. (The optional <tt>&lt;rest&gt;</tt> is ignored so that
494 the command can read the input given to the <tt>post-rewrite</tt> hook.)</p></div>
495 </dd>
496 <dt class="hdlist1">
497 append
498 </dt>
499 <dd>
501 Append to the notes of an existing object (defaults to HEAD).
502 Creates a new notes object if needed.
503 </p>
504 </dd>
505 <dt class="hdlist1">
506 edit
507 </dt>
508 <dd>
510 Edit the notes for a given object (defaults to HEAD).
511 </p>
512 </dd>
513 <dt class="hdlist1">
514 show
515 </dt>
516 <dd>
518 Show the notes for a given object (defaults to HEAD).
519 </p>
520 </dd>
521 <dt class="hdlist1">
522 merge
523 </dt>
524 <dd>
526 Merge the given notes ref into the current notes ref.
527 This will try to merge the changes made by the given
528 notes ref (called "remote") since the merge-base (if
529 any) into the current notes ref (called "local").
530 </p>
531 <div class="paragraph"><p>If conflicts arise and a strategy for automatically resolving
532 conflicting notes (see the -s/--strategy option) is not given,
533 the "manual" resolver is used. This resolver checks out the
534 conflicting notes in a special worktree (<tt>.git/NOTES_MERGE_WORKTREE</tt>),
535 and instructs the user to manually resolve the conflicts there.
536 When done, the user can either finalize the merge with
537 <em>git notes merge --commit</em>, or abort the merge with
538 <em>git notes merge --abort</em>.</p></div>
539 </dd>
540 <dt class="hdlist1">
541 remove
542 </dt>
543 <dd>
545 Remove the notes for a given object (defaults to HEAD).
546 This is equivalent to specifying an empty note message to
547 the <tt>edit</tt> subcommand.
548 </p>
549 </dd>
550 <dt class="hdlist1">
551 prune
552 </dt>
553 <dd>
555 Remove all notes for non-existing/unreachable objects.
556 </p>
557 </dd>
558 <dt class="hdlist1">
559 get-ref
560 </dt>
561 <dd>
563 Print the current notes ref. This provides an easy way to
564 retrieve the current notes ref (e.g. from scripts).
565 </p>
566 </dd>
567 </dl></div>
568 </div>
569 <h2 id="_options">OPTIONS</h2>
570 <div class="sectionbody">
571 <div class="dlist"><dl>
572 <dt class="hdlist1">
574 </dt>
575 <dt class="hdlist1">
576 --force
577 </dt>
578 <dd>
580 When adding notes to an object that already has notes,
581 overwrite the existing notes (instead of aborting).
582 </p>
583 </dd>
584 <dt class="hdlist1">
585 -m &lt;msg&gt;
586 </dt>
587 <dt class="hdlist1">
588 --message=&lt;msg&gt;
589 </dt>
590 <dd>
592 Use the given note message (instead of prompting).
593 If multiple <tt>-m</tt> options are given, their values
594 are concatenated as separate paragraphs.
595 Lines starting with <tt>#</tt> and empty lines other than a
596 single line between paragraphs will be stripped out.
597 </p>
598 </dd>
599 <dt class="hdlist1">
600 -F &lt;file&gt;
601 </dt>
602 <dt class="hdlist1">
603 --file=&lt;file&gt;
604 </dt>
605 <dd>
607 Take the note message from the given file. Use <em>-</em> to
608 read the note message from the standard input.
609 Lines starting with <tt>#</tt> and empty lines other than a
610 single line between paragraphs will be stripped out.
611 </p>
612 </dd>
613 <dt class="hdlist1">
614 -C &lt;object&gt;
615 </dt>
616 <dt class="hdlist1">
617 --reuse-message=&lt;object&gt;
618 </dt>
619 <dd>
621 Take the note message from the given blob object (for
622 example, another note).
623 </p>
624 </dd>
625 <dt class="hdlist1">
626 -c &lt;object&gt;
627 </dt>
628 <dt class="hdlist1">
629 --reedit-message=&lt;object&gt;
630 </dt>
631 <dd>
633 Like <em>-C</em>, but with <em>-c</em> the editor is invoked, so that
634 the user can further edit the note message.
635 </p>
636 </dd>
637 <dt class="hdlist1">
638 --ref &lt;ref&gt;
639 </dt>
640 <dd>
642 Manipulate the notes tree in &lt;ref&gt;. This overrides
643 <em>GIT_NOTES_REF</em> and the "core.notesRef" configuration. The ref
644 is taken to be in <tt>refs/notes/</tt> if it is not qualified.
645 </p>
646 </dd>
647 <dt class="hdlist1">
649 </dt>
650 <dt class="hdlist1">
651 --dry-run
652 </dt>
653 <dd>
655 Do not remove anything; just report the object names whose notes
656 would be removed.
657 </p>
658 </dd>
659 <dt class="hdlist1">
660 -s &lt;strategy&gt;
661 </dt>
662 <dt class="hdlist1">
663 --strategy=&lt;strategy&gt;
664 </dt>
665 <dd>
667 When merging notes, resolve notes conflicts using the given
668 strategy. The following strategies are recognized: "manual"
669 (default), "ours", "theirs", "union" and "cat_sort_uniq".
670 See the "NOTES MERGE STRATEGIES" section below for more
671 information on each notes merge strategy.
672 </p>
673 </dd>
674 <dt class="hdlist1">
675 --commit
676 </dt>
677 <dd>
679 Finalize an in-progress <em>git notes merge</em>. Use this option
680 when you have resolved the conflicts that <em>git notes merge</em>
681 stored in .git/NOTES_MERGE_WORKTREE. This amends the partial
682 merge commit created by <em>git notes merge</em> (stored in
683 .git/NOTES_MERGE_PARTIAL) by adding the notes in
684 .git/NOTES_MERGE_WORKTREE. The notes ref stored in the
685 .git/NOTES_MERGE_REF symref is updated to the resulting commit.
686 </p>
687 </dd>
688 <dt class="hdlist1">
689 --abort
690 </dt>
691 <dd>
693 Abort/reset a in-progress <em>git notes merge</em>, i.e. a notes merge
694 with conflicts. This simply removes all files related to the
695 notes merge.
696 </p>
697 </dd>
698 <dt class="hdlist1">
700 </dt>
701 <dt class="hdlist1">
702 --quiet
703 </dt>
704 <dd>
706 When merging notes, operate quietly.
707 </p>
708 </dd>
709 <dt class="hdlist1">
711 </dt>
712 <dt class="hdlist1">
713 --verbose
714 </dt>
715 <dd>
717 When merging notes, be more verbose.
718 When pruning notes, report all object names whose notes are
719 removed.
720 </p>
721 </dd>
722 </dl></div>
723 </div>
724 <h2 id="_discussion">DISCUSSION</h2>
725 <div class="sectionbody">
726 <div class="paragraph"><p>Commit notes are blobs containing extra information about an object
727 (usually information to supplement a commit&#8217;s message). These blobs
728 are taken from notes refs. A notes ref is usually a branch which
729 contains "files" whose paths are the object names for the objects
730 they describe, with some directory separators included for performance
731 reasons <br />[Permitted pathnames have the form
732 <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
733 names of two hexadecimal digits each followed by a filename with the
734 rest of the object ID.]<br />.</p></div>
735 <div class="paragraph"><p>Every notes change creates a new commit at the specified notes ref.
736 You can therefore inspect the history of the notes by invoking, e.g.,
737 <tt>git log -p notes/commits</tt>. Currently the commit message only records
738 which operation triggered the update, and the commit authorship is
739 determined according to the usual rules (see <a href="git-commit.html">git-commit(1)</a>).
740 These details may change in the future.</p></div>
741 <div class="paragraph"><p>It is also permitted for a notes ref to point directly to a tree
742 object, in which case the history of the notes can be read with
743 <tt>git log -p -g &lt;refname&gt;</tt>.</p></div>
744 </div>
745 <h2 id="_notes_merge_strategies">NOTES MERGE STRATEGIES</h2>
746 <div class="sectionbody">
747 <div class="paragraph"><p>The default notes merge strategy is "manual", which checks out
748 conflicting notes in a special work tree for resolving notes conflicts
749 (<tt>.git/NOTES_MERGE_WORKTREE</tt>), and instructs the user to resolve the
750 conflicts in that work tree.
751 When done, the user can either finalize the merge with
752 <em>git notes merge --commit</em>, or abort the merge with
753 <em>git notes merge --abort</em>.</p></div>
754 <div class="paragraph"><p>"ours" automatically resolves conflicting notes in favor of the local
755 version (i.e. the current notes ref).</p></div>
756 <div class="paragraph"><p>"theirs" automatically resolves notes conflicts in favor of the remote
757 version (i.e. the given notes ref being merged into the current notes
758 ref).</p></div>
759 <div class="paragraph"><p>"union" automatically resolves notes conflicts by concatenating the
760 local and remote versions.</p></div>
761 <div class="paragraph"><p>"cat_sort_uniq" is similar to "union", but in addition to concatenating
762 the local and remote versions, this strategy also sorts the resulting
763 lines, and removes duplicate lines from the result. This is equivalent
764 to applying the "cat | sort | uniq" shell pipeline to the local and
765 remote versions. This strategy is useful if the notes follow a line-based
766 format where one wants to avoid duplicated lines in the merge result.
767 Note that if either the local or remote version contain duplicate lines
768 prior to the merge, these will also be removed by this notes merge
769 strategy.</p></div>
770 </div>
771 <h2 id="_examples">EXAMPLES</h2>
772 <div class="sectionbody">
773 <div class="paragraph"><p>You can use notes to add annotations with information that was not
774 available at the time a commit was written.</p></div>
775 <div class="listingblock">
776 <div class="content">
777 <pre><tt>$ git notes add -m 'Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;' 72a144e2
778 $ git show -s 72a144e
779 [...]
780 Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
782 Notes:
783 Tested-by: Johannes Sixt &lt;j6t@kdbg.org&gt;</tt></pre>
784 </div></div>
785 <div class="paragraph"><p>In principle, a note is a regular Git blob, and any kind of
786 (non-)format is accepted. You can binary-safely create notes from
787 arbitrary files using <em>git hash-object</em>:</p></div>
788 <div class="listingblock">
789 <div class="content">
790 <pre><tt>$ cc *.c
791 $ blob=$(git hash-object -w a.out)
792 $ git notes --ref=built add -C "$blob" HEAD</tt></pre>
793 </div></div>
794 <div class="paragraph"><p>Of course, it doesn&#8217;t make much sense to display non-text-format notes
795 with <em>git log</em>, so if you use such notes, you&#8217;ll probably need to write
796 some special-purpose tools to do something useful with them.</p></div>
797 </div>
798 <h2 id="_configuration">CONFIGURATION</h2>
799 <div class="sectionbody">
800 <div class="dlist"><dl>
801 <dt class="hdlist1">
802 core.notesRef
803 </dt>
804 <dd>
806 Notes ref to read and manipulate instead of
807 <tt>refs/notes/commits</tt>. Must be an unabbreviated ref name.
808 This setting can be overridden through the environment and
809 command line.
810 </p>
811 </dd>
812 <dt class="hdlist1">
813 notes.displayRef
814 </dt>
815 <dd>
817 Which ref (or refs, if a glob or specified more than once), in
818 addition to the default set by <tt>core.notesRef</tt> or
819 <em>GIT_NOTES_REF</em>, to read notes from when showing commit
820 messages with the <em>git log</em> family of commands.
821 This setting can be overridden on the command line or by the
822 <em>GIT_NOTES_DISPLAY_REF</em> environment variable.
823 See <a href="git-log.html">git-log(1)</a>.
824 </p>
825 </dd>
826 <dt class="hdlist1">
827 notes.rewrite.&lt;command&gt;
828 </dt>
829 <dd>
831 When rewriting commits with &lt;command&gt; (currently <tt>amend</tt> or
832 <tt>rebase</tt>), if this variable is <tt>false</tt>, git will not copy
833 notes from the original to the rewritten commit. Defaults to
834 <tt>true</tt>. See also "<tt>notes.rewriteRef</tt>" below.
835 </p>
836 <div class="paragraph"><p>This setting can be overridden by the <em>GIT_NOTES_REWRITE_REF</em>
837 environment variable.</p></div>
838 </dd>
839 <dt class="hdlist1">
840 notes.rewriteMode
841 </dt>
842 <dd>
844 When copying notes during a rewrite, what to do if the target
845 commit already has a note. Must be one of <tt>overwrite</tt>,
846 <tt>concatenate</tt>, and <tt>ignore</tt>. Defaults to <tt>concatenate</tt>.
847 </p>
848 <div class="paragraph"><p>This setting can be overridden with the <tt>GIT_NOTES_REWRITE_MODE</tt>
849 environment variable.</p></div>
850 </dd>
851 <dt class="hdlist1">
852 notes.rewriteRef
853 </dt>
854 <dd>
856 When copying notes during a rewrite, specifies the (fully
857 qualified) ref whose notes should be copied. May be a glob,
858 in which case notes in all matching refs will be copied. You
859 may also specify this configuration several times.
860 </p>
861 <div class="paragraph"><p>Does not have a default value; you must configure this variable to
862 enable note rewriting.</p></div>
863 <div class="paragraph"><p>Can be overridden with the <em>GIT_NOTES_REWRITE_REF</em> environment variable.</p></div>
864 </dd>
865 </dl></div>
866 </div>
867 <h2 id="_environment">ENVIRONMENT</h2>
868 <div class="sectionbody">
869 <div class="dlist"><dl>
870 <dt class="hdlist1">
871 <em>GIT_NOTES_REF</em>
872 </dt>
873 <dd>
875 Which ref to manipulate notes from, instead of <tt>refs/notes/commits</tt>.
876 This overrides the <tt>core.notesRef</tt> setting.
877 </p>
878 </dd>
879 <dt class="hdlist1">
880 <em>GIT_NOTES_DISPLAY_REF</em>
881 </dt>
882 <dd>
884 Colon-delimited list of refs or globs indicating which refs,
885 in addition to the default from <tt>core.notesRef</tt> or
886 <em>GIT_NOTES_REF</em>, to read notes from when showing commit
887 messages.
888 This overrides the <tt>notes.displayRef</tt> setting.
889 </p>
890 <div class="paragraph"><p>A warning will be issued for refs that do not exist, but a glob that
891 does not match any refs is silently ignored.</p></div>
892 </dd>
893 <dt class="hdlist1">
894 <em>GIT_NOTES_REWRITE_MODE</em>
895 </dt>
896 <dd>
898 When copying notes during a rewrite, what to do if the target
899 commit already has a note.
900 Must be one of <tt>overwrite</tt>, <tt>concatenate</tt>, and <tt>ignore</tt>.
901 This overrides the <tt>core.rewriteMode</tt> setting.
902 </p>
903 </dd>
904 <dt class="hdlist1">
905 <em>GIT_NOTES_REWRITE_REF</em>
906 </dt>
907 <dd>
909 When rewriting commits, which notes to copy from the original
910 to the rewritten commit. Must be a colon-delimited list of
911 refs or globs.
912 </p>
913 <div class="paragraph"><p>If not set in the environment, the list of notes to copy depends
914 on the <tt>notes.rewrite.&lt;command&gt;</tt> and <tt>notes.rewriteRef</tt> settings.</p></div>
915 </dd>
916 </dl></div>
917 </div>
918 <h2 id="_author">Author</h2>
919 <div class="sectionbody">
920 <div class="paragraph"><p>Written by Johannes Schindelin &lt;<a href="mailto:johannes.schindelin@gmx.de">johannes.schindelin@gmx.de</a>&gt; and
921 Johan Herland &lt;<a href="mailto:johan@herland.net">johan@herland.net</a>&gt;</p></div>
922 </div>
923 <h2 id="_documentation">Documentation</h2>
924 <div class="sectionbody">
925 <div class="paragraph"><p>Documentation by Johannes Schindelin and Johan Herland</p></div>
926 </div>
927 <h2 id="_git">GIT</h2>
928 <div class="sectionbody">
929 <div class="paragraph"><p>Part of the <a href="git.html">git(7)</a> suite</p></div>
930 </div>
931 <div id="footer">
932 <div id="footer-text">
933 Last updated 2010-12-08 22:49:27 UTC
934 </div>
935 </div>
936 </body>
937 </html>