[postgis-devel] git notes: a quick & short howto

Justin Pryzby pryzby at telsasoft.com
Mon Oct 3 05:31:45 PDT 2022


On Mon, Oct 03, 2022 at 02:01:37PM +0200, Sandro Santilli wrote:
> It happens that we push commits containing some broken reference in
> the commit log. When that happens, it may be useful to "attach" a
> note to the commit, so that other readers don't get confused.
> It's a form of "errata corrige" that doesn't require re-writing
> history.
> 
> Example of how to do this:

Thanks for reminding me about this.

>   # make sure we have latest notes from origin first
>   git fetch origin refs/notes/*:refs/notes/*
> 
>   # add our note
>   git notes add -m "Correct ticket reference is #5252" 171f8007
> 
>   # push our notes to origin
>   git push origin refs/notes/*
> 
> The so added note will be shown by `git show` or `git log`:

Note that the notes are not automatically pulled, so are only shown 
to someone who ran the special "fetch" command.

(pun acknowledged but not intended).

-- 
Justin


More information about the postgis-devel mailing list