git: how to push messages added by git notes to the central git server?

it seems like there is no proper documentation regarding git notes. I have added some notes to one of the commit using git notes add command. but when i push the commit, and later do a separate clone, i dont see the note message there. Is there a way to push all the note messages added via git notes command?


Solution 1:

According to here [git-scm.org], you can use

git push <remote> refs/notes/*

to push all notes. Fetching can be done with

git fetch origin refs/notes/*:refs/notes/*