Documentation / git-notes.txton commit Merge branch 'jk/maint-add-ignored-dir' (4e7d08a)
   1git-notes(1)
   2============
   3
   4NAME
   5----
   6git-notes - Add/inspect object notes
   7
   8SYNOPSIS
   9--------
  10[verse]
  11'git notes' [list [<object>]]
  12'git notes' add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
  13'git notes' copy [-f] <from-object> <to-object>
  14'git notes' append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>]
  15'git notes' edit [<object>]
  16'git notes' show [<object>]
  17'git notes' remove [<object>]
  18'git notes' prune
  19
  20
  21DESCRIPTION
  22-----------
  23This command allows you to add/remove notes to/from objects, without
  24changing the objects themselves.
  25
  26A typical use of notes is to extend a commit message without having
  27to change the commit itself. Such commit notes can be shown by `git log`
  28along with the original commit message. To discern these notes from the
  29message stored in the commit object, the notes are indented like the
  30message, after an unindented line saying "Notes:".
  31
  32To disable notes, you have to set the config variable core.notesRef to
  33the empty string.  Alternatively, you can set it to a different ref,
  34something like "refs/notes/bugzilla".  This setting can be overridden
  35by the environment variable "GIT_NOTES_REF".
  36
  37
  38SUBCOMMANDS
  39-----------
  40
  41list::
  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
  47add::
  48        Add notes for a given object (defaults to HEAD). Abort if the
  49        object already has notes (use `-f` to overwrite an
  50        existing note).
  51
  52copy::
  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        object 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
  59append::
  60        Append to the notes of an existing object (defaults to HEAD).
  61        Creates a new notes object if needed.
  62
  63edit::
  64        Edit the notes for a given object (defaults to HEAD).
  65
  66show::
  67        Show the notes for a given object (defaults to HEAD).
  68
  69remove::
  70        Remove the notes for a given object (defaults to HEAD).
  71        This is equivalent to specifying an empty note message to
  72        the `edit` subcommand.
  73
  74prune::
  75        Remove all notes for non-existing/unreachable objects.
  76
  77OPTIONS
  78-------
  79-f::
  80--force::
  81        When adding notes to an object that already has notes,
  82        overwrite the existing notes (instead of aborting).
  83
  84-m <msg>::
  85--message=<msg>::
  86        Use the given note message (instead of prompting).
  87        If multiple `-m` options are given, their values
  88        are concatenated as separate paragraphs.
  89
  90-F <file>::
  91--file=<file>::
  92        Take the note message from the given file.  Use '-' to
  93        read the note message from the standard input.
  94
  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.
 103
 104Author
 105------
 106Written by Johannes Schindelin <johannes.schindelin@gmx.de> and
 107Johan Herland <johan@herland.net>
 108
 109Documentation
 110-------------
 111Documentation by Johannes Schindelin and Johan Herland
 112
 113GIT
 114---
 115Part of the linkgit:git[7] suite