builtin-notes: Add -c/-C options for reusing notes
[git/dkf.git] / Documentation / git-notes.txt
blob15de4b344a093354df1332c6e037e8f29508c8d5
1 git-notes(1)
2 ============
4 NAME
5 ----
6 git-notes - Add/inspect object notes
8 SYNOPSIS
9 --------
10 [verse]
11 'git notes' [list [<object>]]
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>]
14 'git notes' edit [<object>]
15 'git notes' show [<object>]
16 'git notes' remove [<object>]
17 'git notes' prune
20 DESCRIPTION
21 -----------
22 This command allows you to add/remove notes to/from objects, without
23 changing the objects themselves.
25 A typical use of notes is to extend a commit message without having
26 to change the commit itself. Such commit notes can be shown by `git log`
27 along with the original commit message. To discern these notes from the
28 message stored in the commit object, the notes are indented like the
29 message, after an unindented line saying "Notes:".
31 To disable notes, you have to set the config variable core.notesRef to
32 the empty string.  Alternatively, you can set it to a different ref,
33 something like "refs/notes/bugzilla".  This setting can be overridden
34 by the environment variable "GIT_NOTES_REF".
37 SUBCOMMANDS
38 -----------
40 list::
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.
46 add::
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).
51 append::
52         Append to the notes of an existing object (defaults to HEAD).
53         Creates a new notes object if needed.
55 edit::
56         Edit the notes for a given object (defaults to HEAD).
58 show::
59         Show the notes for a given object (defaults to HEAD).
61 remove::
62         Remove the notes for a given object (defaults to HEAD).
63         This is equivalent to specifying an empty note message to
64         the `edit` subcommand.
66 prune::
67         Remove all notes for non-existing/unreachable objects.
69 OPTIONS
70 -------
71 -f::
72 --force::
73         When adding notes to an object that already has notes,
74         overwrite the existing notes (instead of aborting).
76 -m <msg>::
77 --message=<msg>::
78         Use the given note message (instead of prompting).
79         If multiple `-m` options are given, their values
80         are concatenated as separate paragraphs.
82 -F <file>::
83 --file=<file>::
84         Take the note message from the given file.  Use '-' to
85         read the note message from the standard input.
87 -C <object>::
88 --reuse-message=<object>::
89         Reuse the note message from the given note object.
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.
96 Author
97 ------
98 Written by Johannes Schindelin <johannes.schindelin@gmx.de> and
99 Johan Herland <johan@herland.net>
101 Documentation
102 -------------
103 Documentation by Johannes Schindelin and Johan Herland
107 Part of the linkgit:git[7] suite