Live data from Hacker News

A Hidden Git Feature: Notes

brianschrader.com

1–8 of 8 posts

Re: A Hidden Git Feature: Notes

#4

actually i think it would be nice also push it to remote repository..

Seems possible, just not straightforward: https://gist.github.com/topheman/ec8cde7c54e24a785e52

Hadn't heard about this feature, but as I understand it, the notes are stored as commits, just not in the same namespace/on the same branch as you are working on.

Re: A Hidden Git Feature: Notes

#6
post #3

Are the notes tied to a specific commit, or is it per object?

A note on a commit is stored as a text file, named with the commit id (git sha). The file is revision controlled by git, usually under refs/notes/commits.

You can 'git checkout refs/notes/commits' and see the structure.