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

Re: git-replay/git-history lose notes

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2026, 13:04 UTC
Message-ID
<xmqqv79osoqa.fsf@gitster.g>
In-Reply-To
<anLXz2vos4zbIciW@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 13 quoted lines
>> It looks like git-replay and git-history will drop notes (or rather,
>> not carry them over) when rewriting history. I've seen this both with
>> "git replay --onto=… …" and "git history fixup" recently, though I
>> suspect it affects all the modes.
>> 
>> Fortunately when I check range-diffs before pushing out new versions,
>> I notice notes have disappeared and can "git notes copy @{1}" or
>> similar for a note at the tip. Recovery for the intermediate commits
>> is a little more… involved… as I'm sure you can imagine.
>
> This somehow rings a bell -- wasn't there a recent discussion about this
> on the mailing list somewhere? I might be confusing it with a different
> command though that's loosing notes.

I recall mentioning the reason why rebase and cherry-pick behave differently with respect to notes, and why that is a good thing, but that may not be what is ringing a bell for both of you.

Previous: D. Ben KnobleNext: Elijah Newren
Message 6 of 9 in “git-replay/git-history lose notes”
  1. D. Ben KnobleAug 4, 2026
  2. Patrick SteinhardtAug 5, 2026
  3. D. Ben KnobleAug 5, 2026
  4. Phillip WoodAug 5, 2026
  5. D. Ben KnobleAug 5, 2026
  6. Junio C HamanoAug 5, 2026
  7. Elijah NewrenAug 7, 2026
  8. erik88Aug 7, 2026
  9. Elijah NewrenAug 7, 2026

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.