git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] git-notes.txt: Explain how to transfer notes between repos

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 10, 2014, 19:59 UTC
Message-ID
<CAPig+cQeJz2DZ+=qdAM-grOC=kQ+DSTL8gsycyq8djrGoaPVJg@mail.gmail.com>
In-Reply-To
<1410357414-691-1-git-send-email-sunny@sunbase.org>
On Wed, Sep 10, 2014 at 9:56 AM, Øyvind A. Holm <sunny@sunbase.org> wrote:
Show 18 quoted lines
> The documentation for git notes did not mention anywhere how to transfer
> notes between repositories, create a section that explains this topic.
>
> Signed-off-by: Øyvind A. Holm <sunny@sunbase.org>
> ---
> diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt
> index 310f0a5..4237bec 100644
> --- a/Documentation/git-notes.txt
> +++ b/Documentation/git-notes.txt
> @@ -264,6 +264,45 @@ prior to the merge, these will also be removed by this notes merge
>  strategy.
>
>
> +TRANSFERRING NOTES ACROSS REPOSITORIES
> +--------------------------------------
> +
> +Notes are not transferred by default when using the standard
> +fetch/push commands, but has be done explicitly. To fetch all notes
At minimum: s/has be/has to be/
Slightly improved phrasing, perhaps:
    Notes are not transferred, by default, when using the standard
    fetch/push commands, thus must be transferred explicitly.
> +from a particular remote, use
s/use/use:/
Show 37 quoted lines
> +------------
> +$ git fetch origin refs/notes/*:refs/notes/*
> +------------
> +
> +`git fetch` can be configured to automatically fetch notes from a
> +remote with this command:
> +
> +------------
> +$ git config --add remote.origin.fetch +refs/notes/*:refs/notes/*
> +------------
> +
> +To transfer notes to a remote repository:
> +
> +------------
> +$ git push origin refs/notes/*
> +------------
> +
> +If you don't want to fetch or push all notes stored under
> +`refs/notes/`, replace the asterisk with the specific type of notes
> +you want to transfer:
> +
> +------------
> +$ git fetch origin refs/notes/commits:refs/notes/commits
> +------------
> +
> +or
> +
> +------------
> +$ git push origin refs/notes/commits
> +------------
> +
> +
>  EXAMPLES
>  --------
>
> --
> 2.1.0.127.g0c72b98
Previous: Øyvind A. HolmNext: Johan Herland
Message 2 of 3 in “git-notes.txt: Explain how to transfer notes between repos”
  1. git-notes.txt: Explain how to transfer notes between reposØyvind A. Holm, Sep 10, 2014
  2. Eric SunshineSep 10, 2014
  3. Johan HerlandSep 10, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.