table of contents
GIT-NOTES(1) | Git Manual | GIT-NOTES(1) |
NAME¶
git-notes - Add/inspect object notes
SYNOPSIS¶
git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes remove [<object>] git notes prune
DESCRIPTION¶
This command allows you to add/remove notes to/from objects, without changing the objects themselves.
A typical use of notes is to extend a commit message without having to change the commit itself. Such commit notes can be shown by git log along with the original commit message. To discern these notes from the message stored in the commit object, the notes are indented like the message, after an unindented line saying "Notes (<refname>):" (or "Notes:" for the default setting).
This command always manipulates the notes specified in "core.notesRef" (see git-config(1)), which can be overridden by GIT_NOTES_REF. To change which notes are shown by git-log, see the "notes.displayRef" configuration.
See the description of "notes.rewrite.<command>" in git-config(1) for a way of carrying your notes across commands that rewrite commits.
SUBCOMMANDS¶
list
add
copy
In --stdin mode, take lines in the format
<from-object> SP <to-object> [ SP <rest> ] LF
on standard input, and copy the notes from each <from-object> to its corresponding <to-object>. (The optional <rest> is ignored so that the command can read the input given to the post-rewrite hook.)
append
edit
show
remove
prune
OPTIONS¶
-f, --force
-m <msg>, --message=<msg>
-F <file>, --file=<file>
-C <object>, --reuse-message=<object>
-c <object>, --reedit-message=<object>
--ref <ref>
NOTES¶
Every notes change creates a new commit at the specified notes ref. You can therefore inspect the history of the notes by invoking, e.g., git log -p notes/commits.
Currently the commit message only records which operation triggered the update, and the commit authorship is determined according to the usual rules (see git-commit(1)). These details may change in the future.
AUTHOR¶
Written by Johannes Schindelin <johannes.schindelin@gmx.de[1]> and Johan Herland <johan@herland.net[2]>
DOCUMENTATION¶
Documentation by Johannes Schindelin and Johan Herland
GIT¶
Part of the git(7) suite
NOTES¶
- 1.
- johannes.schindelin@gmx.de
- 2.
- johan@herland.net
02/03/2020 | Git 1.7.1 |