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