Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Git Notes and GitHub

Git Notes and GitHub

Git has a little used feature called Notes that is an excellent support to traditional commit messages. Not surprisingly, this feature also has a great visual rendering on the GitHub.com site when Notes are pushed to a Git repository.

Matthew McCullough

April 21, 2012
Tweet

More Decks by Matthew McCullough

Other Decks in Education

Transcript

  1. • Object pointing to a commit • Supplemental to commit

    messages • Namespaced for grouping of notes
  2. • Object pointing to a commit • Supplemental to commit

    messages • Namespaced for grouping of notes
  3. • Object pointing to a commit • Supplemental to commit

    messages • Namespaced for grouping of notes
  4. — Git notes man page A typical use of notes

    is to supplement a commit message without changing the commit itself.
  5. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  6. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  7. $ git config --global alias.pushnotes "\!sh -c 'git push \$1

    refs/notes/*' -" $ git pushnotes origin
  8. $ git fetch origin refs/notes/commits:refs/notes/commits // or $ git fetch

    origin refs/notes/jenkins:refs/notes/jenkins // or $ git fetch origin refs/notes/*:refs/notes/*
  9. $ vim .git/config ...and edit [remote ”origin”] fetch = +refs/heads/*:refs/remotes/origin/*

    ...to be [remote ”origin”] fetch = +refs/heads/*:refs/remotes/origin/* fetch = +refs/notes/*:refs/notes/*
  10. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  11. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  12. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  13. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  14. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref
  15. GIT-NOTES(1) Git Manual GIT-NOTES(1) NAME git-notes - Add or inspect

    object notes SYNOPSIS git notes [list [<object>]] git notes add [-f] [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes copy [-f] ( --stdin | <from-object> <to-object> ) git notes append [-F <file> | -m <msg> | (-c | -C) <object>] [<object>] git notes edit [<object>] git notes show [<object>] git notes merge [-v | -q] [-s <strategy> ] <notes_ref> git notes merge --commit [-v | -q] git notes merge --abort [-v | -q] git notes remove [--ignore-missing] [--stdin] [<object>...] git notes prune [-n | -v] git notes get-ref