]> git.ipfire.org Git - thirdparty/git.git/blame - Documentation/git-notes.txt
builtin-notes: Add -c/-C options for reusing notes
[thirdparty/git.git] / Documentation / git-notes.txt
CommitLineData
65d9fb48
JS
1git-notes(1)
2============
3
4NAME
5----
7d541174 6git-notes - Add/inspect object notes
65d9fb48
JS
7
8SYNOPSIS
9--------
10[verse]
e397421a 11'git notes' [list [<object>]]
0691cff7
JH
12'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
13'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
aaec9bcf 14'git notes' edit [<object>]
e397421a
JH
15'git notes' show [<object>]
16'git notes' remove [<object>]
17'git notes' prune
18
65d9fb48
JS
19
20DESCRIPTION
21-----------
7d541174
JH
22This command allows you to add/remove notes to/from objects, without
23changing the objects themselves.
65d9fb48 24
7d541174
JH
25A typical use of notes is to extend a commit message without having
26to change the commit itself. Such commit notes can be shown by `git log`
27along with the original commit message. To discern these notes from the
28message stored in the commit object, the notes are indented like the
29message, after an unindented line saying "Notes:".
30
31To disable notes, you have to set the config variable core.notesRef to
32the empty string. Alternatively, you can set it to a different ref,
33something like "refs/notes/bugzilla". This setting can be overridden
34by the environment variable "GIT_NOTES_REF".
65d9fb48
JS
35
36
37SUBCOMMANDS
38-----------
39
e397421a
JH
40list::
41 List the notes object for a given object. If no object is
42 given, show a list of all note objects and the objects they
43 annotate (in the format "<note object> <annotated object>").
44 This is the default subcommand if no subcommand is given.
45
7aa4754e
JH
46add::
47 Add notes for a given object (defaults to HEAD). Abort if the
48 object already has notes, abort. (use `-f` to overwrite an
49 existing note).
50
2347fae5
JH
51append::
52 Append to the notes of an existing object (defaults to HEAD).
53 Creates a new notes object if needed.
54
65d9fb48 55edit::
7d541174 56 Edit the notes for a given object (defaults to HEAD).
65d9fb48
JS
57
58show::
7d541174 59 Show the notes for a given object (defaults to HEAD).
65d9fb48 60
92b3385f 61remove::
7d541174 62 Remove the notes for a given object (defaults to HEAD).
92b3385f
JH
63 This is equivalent to specifying an empty note message to
64 the `edit` subcommand.
65
d6576e1f
JH
66prune::
67 Remove all notes for non-existing/unreachable objects.
65d9fb48 68
d9246d43
JH
69OPTIONS
70-------
7aa4754e
JH
71-f::
72--force::
73 When adding notes to an object that already has notes,
74 overwrite the existing notes (instead of aborting).
75
d9246d43 76-m <msg>::
ba20f15e 77--message=<msg>::
d9246d43 78 Use the given note message (instead of prompting).
cd067d3b
JH
79 If multiple `-m` options are given, their values
80 are concatenated as separate paragraphs.
d9246d43
JH
81
82-F <file>::
ba20f15e 83--file=<file>::
d9246d43
JH
84 Take the note message from the given file. Use '-' to
85 read the note message from the standard input.
d9246d43 86
0691cff7
JH
87-C <object>::
88--reuse-message=<object>::
89 Reuse the note message from the given note object.
90
91-c <object>::
92--reedit-message=<object>::
93 Like '-C', but with '-c' the editor is invoked, so that
94 the user can further edit the note message.
d9246d43 95
65d9fb48
JS
96Author
97------
7d541174
JH
98Written by Johannes Schindelin <johannes.schindelin@gmx.de> and
99Johan Herland <johan@herland.net>
65d9fb48
JS
100
101Documentation
102-------------
7d541174 103Documentation by Johannes Schindelin and Johan Herland
65d9fb48
JS
104
105GIT
106---
107Part of the linkgit:git[7] suite