The aim of this research is to provide a feedback around git notes command.
There's a git_notes.sh script, which
adds number of notes into your git
repository.
- Add N-notes into your git repository.
- The notes are added with
git node add -f -m "Testing notes ${cnt}\npackit_test=yes" -m "json=${JSON_NOTE}" ${commit}
:
- The notes are added with
- Show all notes added by previous command
- Show specific (2th) note from git.
git notes
are basically one liners. We can use a separator and for
some things it can be used as a "database". The git_notes.sh script
also stores JSON object into git.
If multiple
-m
options are given, their values
are concatenated as separate paragraphs.
Yes, but, first of all, we have to read note from specific commit and then append the state into git note. Only one note per one commit is allowed.
For 'editing' git notes, a command
git note add -f -m "some message"
has to be used.
-f
option is used for overwriting notes.
Yes, git notes
were designed for it. See git_notes.sh.
To push the notes into git use the command
git push origin refs/notes/commits
To pull the notes from git use the command
git fetch origin refs/notes/commits:refs/notes/commits
[remote "origin"]
fetch = +refs/notes/*:refs/notes/*