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

Re: How does git track history overwrites?

From
Jens Tröger <jens.troeger@light-speed.de>
Date
May 25, 2026, 22:47 UTC
Message-ID
<074E783A-027D-4C5B-BC44-CC38C53735D7@light-speed.de>
In-Reply-To
<87se7gasn8.fsf@gitster.g>
Thank you Chris and Junio!
Show 6 quoted lines
> [Junio] Where does this line in your discussion page at GitHub (which is
> omitted from the post to this list) come from?
> 
>    commit fda77690955e9b63c6687d8806bafd56a526e45f (grafted, HEAD)
> 
> Are you doing anything funky with .git/info/grafts by any chance?
That line is the result of a `git log` after the `git fetch` I mentioned in my initial email.
> [Chris] To really understand this properly, we need to understand
> the root of a seeming contradiction:
> 
> [...]
Thank you for your elaborate explanation, Chris, that all makes a lot of sense. A few follow-up questions:
 •  Is all the object information stored with a repo clone locally as well, or does some/most/all of it stay on the remote server repo?
 •  How exactly does git connect the dots between commit dda8db1 and fda7769, how does it “know” the former was superseded by the latter (i.e. I fetch the former and Git uses the latter for head)?
 •  Based on the previous question, can I manually find such a connection between two commit objects too?
It sounds like reading some internals would be helpful. I’m noodling through https://git-scm.com/book/en/v2/Git-Internals-Git-Objects but perhaps you have some more recommendations?

With many greetings, Jens

Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 6 in “How does git track history overwrites?”
  1. Jens TrögerMay 24, 2026
  2. Chris TorekMay 25, 2026
  3. Junio C HamanoMay 25, 2026
  4. Jens TrögerMay 25, 2026
  5. Junio C HamanoMay 25, 2026
  6. Jens TrögerMay 25, 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.