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

Git

Git Problem Overview


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?

Git Solutions


Solution 1 - Git

Push all notes:

git push <remote> refs/notes/*

Fetch all notes:

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

[[git-scm.org] (archive)]

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionIowaView Question on Stackoverflow
Solution 1 - GitsimontView Answer on Stackoverflow