LinuxCommandLibrary

git-notes

Add or view notes to Git commits

TLDR

List all notes and the objects they are attached to

$ git notes list
copy

List all notes attached to a given object (defaults to HEAD)
$ git notes list [[object]]
copy

Show the notes attached to a given object (defaults to HEAD)
$ git notes show [[object]]
copy

Append a note to a specified object (opens the default text editor)
$ git notes append [object]
copy

Append a note to a specified object, specifying the message
$ git notes append --message="[message_text]"
copy

Edit an existing note (defaults to HEAD)
$ git notes edit [[object]]
copy

Copy a note from one object to another
$ git notes copy [source_object] [target_object]
copy

Remove all the notes added to a specified object
$ git notes remove [object]
copy

SYNOPSIS

git notes add [-f] [-m | -F | -c | -C ] []
git notes copy [-f] [-m | -F | -c | -C ] []
git notes append [-f] [-m | -F | -c | -C ] []
git notes show []
git notes merge [-s ] [-m ] []
git notes commit [-m ] []
git notes checkout []
git notes remove [--ignore-missing] []
git notes prune [-n] [-v] []
git notes get-ref

PARAMETERS

add
    Add a note to the specified object. If no object is specified, use the current commit. Uses -m, -F, -c, -C to add the note message from the command line, file, commit or commit content respectively.

copy
    Copy a note from to . If is not specified, use the current commit.

append
    Append to an existing note of the object. If the object has no existing note, it is created like `add` command. Uses -m, -F, -c, -C to add the note message from the command line, file, commit or commit content respectively.

show
    Show the note attached to the specified object. If no object is specified, use the current commit.

merge
    Merge notes from another notes ref into the current notes ref.

commit
    Create a commit to record the current notes state.

checkout
    Checkout the notes from the specified notes ref.

remove
    Remove the note attached to the specified object.

prune
    Remove all notes that point to non-existent objects.

get-ref
    Show the current notes ref.

-f
    Force operation to succeed (e.g., overwrite existing notes).

-m
    Take the note directly from the command line.

-F
    Take the note from the file specified by .

-c
    Take the note from the specified commit object.

-C
    Take the note's content from the specified commit object.


    The Git object (commit, blob, tree, tag) to which the note applies.


    The notes ref (e.g., refs/notes/commits) to operate on.

DESCRIPTION

CAVEATS

NOTES CONFIGURATION

HISTORY

SEE ALSO

Copied to clipboard