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

rationale behind git not tracking history of branches

From
KBKevin Buchs <kevin.buchs@newcontext.com>
Date
May 26, 2020, 21:01 UTC
Message-ID
<CAKTRx=09tjsH0j+Nf4_1uzn-GwasWFB_Q96KEO=qtr5nVBkAew@mail.gmail.com>

For many years of using Git, I always struggled to make sense of commit history graphs (git log --graph; gitk). Just recently I discovered that git does not track the history of branches to which commits belonged and the lightbulb turned on. This is proving to be painful in a project I inherited with permanent multiple branches. Now, I am a bit curious as to the rationale behind this intentional decision not to track branch history. Is it entirely a matter of keeping branches lightweight?

I am assuming one can backfill for the missing capability by using a commit hook to manually track when a branch head is changed. Perhaps by storing the branch in the commit notes.

Kevin Buchs, Senior Engineer, New Context Services kevin.buchs@newcontext.com 507-251-7463 St. Cloud, MN

Next: Jonathan Nieder
Message 1 of 5 in “rationale behind git not tracking history of branches”
  1. Kevin BuchsMay 26, 2020
  2. Jonathan NiederMay 27, 2020
  3. Kevin BuchsMay 27, 2020
  4. Michal SuchánekMay 27, 2020
  5. Randall S. BeckerMay 27, 2020

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.