1GIT-NOTES(1) Git Manual GIT-NOTES(1)
2
3
4
6 git-notes - Add/inspect object notes
7
9 git notes [list [<object>]]
10 git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
11 git notes copy [-f] ( --stdin | <from-object> <to-object> )
12 git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
13 git notes edit [<object>]
14 git notes show [<object>]
15 git notes remove [<object>]
16 git notes prune
17
18
20 This command allows you to add/remove notes to/from objects, without
21 changing the objects themselves.
22
23 A typical use of notes is to extend a commit message without having to
24 change the commit itself. Such commit notes can be shown by git log
25 along with the original commit message. To discern these notes from the
26 message stored in the commit object, the notes are indented like the
27 message, after an unindented line saying "Notes (<refname>):" (or
28 "Notes:" for the default setting).
29
30 This command always manipulates the notes specified in "core.notesRef"
31 (see git-config(1)), which can be overridden by GIT_NOTES_REF. To
32 change which notes are shown by git-log, see the "notes.displayRef"
33 configuration.
34
35 See the description of "notes.rewrite.<command>" in git-config(1) for a
36 way of carrying your notes across commands that rewrite commits.
37
39 list
40 List the notes object for a given object. If no object is given,
41 show a list of all note objects and the objects they annotate (in
42 the format "<note object> <annotated object>"). This is the default
43 subcommand if no subcommand is given.
44
45 add
46 Add notes for a given object (defaults to HEAD). Abort if the
47 object already has notes (use -f to overwrite an existing note).
48
49 copy
50 Copy the notes for the first object onto the second object. Abort
51 if the second object already has notes, or if the first object has
52 none (use -f to overwrite existing notes to the second object).
53 This subcommand is equivalent to: git notes add [-f] -C $(git notes
54 list <from-object>) <to-object>
55
56 In --stdin mode, take lines in the format
57
58 <from-object> SP <to-object> [ SP <rest> ] LF
59
60 on standard input, and copy the notes from each <from-object> to
61 its corresponding <to-object>. (The optional <rest> is ignored so
62 that the command can read the input given to the post-rewrite
63 hook.)
64
65 append
66 Append to the notes of an existing object (defaults to HEAD).
67 Creates a new notes object if needed.
68
69 edit
70 Edit the notes for a given object (defaults to HEAD).
71
72 show
73 Show the notes for a given object (defaults to HEAD).
74
75 remove
76 Remove the notes for a given object (defaults to HEAD). This is
77 equivalent to specifying an empty note message to the edit
78 subcommand.
79
80 prune
81 Remove all notes for non-existing/unreachable objects.
82
84 -f, --force
85 When adding notes to an object that already has notes, overwrite
86 the existing notes (instead of aborting).
87
88 -m <msg>, --message=<msg>
89 Use the given note message (instead of prompting). If multiple -m
90 options are given, their values are concatenated as separate
91 paragraphs.
92
93 -F <file>, --file=<file>
94 Take the note message from the given file. Use - to read the note
95 message from the standard input.
96
97 -C <object>, --reuse-message=<object>
98 Reuse the note message from the given note object.
99
100 -c <object>, --reedit-message=<object>
101 Like -C, but with -c the editor is invoked, so that the user can
102 further edit the note message.
103
104 --ref <ref>
105 Manipulate the notes tree in <ref>. This overrides both
106 GIT_NOTES_REF and the "core.notesRef" configuration. The ref is
107 taken to be in refs/notes/ if it is not qualified.
108
110 Every notes change creates a new commit at the specified notes ref. You
111 can therefore inspect the history of the notes by invoking, e.g., git
112 log -p notes/commits.
113
114 Currently the commit message only records which operation triggered the
115 update, and the commit authorship is determined according to the usual
116 rules (see git-commit(1)). These details may change in the future.
117
119 Written by Johannes Schindelin <johannes.schindelin@gmx.de[1]> and
120 Johan Herland <johan@herland.net[2]>
121
123 Documentation by Johannes Schindelin and Johan Herland
124
126 Part of the git(7) suite
127
129 1. johannes.schindelin@gmx.de
130 mailto:johannes.schindelin@gmx.de
131
132 2. johan@herland.net
133 mailto:johan@herland.net
134
135
136
137Git 1.7.1 08/16/2017 GIT-NOTES(1)