Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Git notes cheat sheet

#Git notes

Warning : Support for isplay of git notes has been dropped by github :

Resource :


git notes add
git notes add -m "my note"


Default namespace is commits

Use git notes --ref COMMAND


git notes --ref jenkins add "build pass"
git notes --ref jenkins show HEAD
git log --show-notes=jenkins
git log --show-notes="*"

--show-notes="*" : Quotes are necessary so that * will be passed to git, not evalueted by the command line


Like tags, notes aren't pushed by default.

git push origin refs/notes/commits
git push origin "refs/notes/*"


Notes aren't fetched by default.

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

To fetch notes by default : vi .git/config

#edit this part

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*

#to become

[remote "origin"]
  fetch = +refs/heads/*:refs/remotes/origin/*
  fetch = +refs/notes/*:refs/notes/*

This comment has been minimized.

Copy link

kynan commented Apr 9, 2016

The linked video is private


This comment has been minimized.

Copy link

Sebi2020 commented Nov 27, 2018

This does not work. The notes weren't fetched by this configuration adjustments.


This comment has been minimized.

Copy link

dten commented May 29, 2019

git notes add is missing -m

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.