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

Tracking branch history

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 12, 2006, 23:18 UTC
Message-ID
<Pine.LNX.4.64.0605121838490.6713@iabervon.org>

One feature that might make git more intuitive to people is if we were to additionally track the history of what commit was the head of each branch over time. This is only vaguely related to the history of the content, but it's well-defined and sometimes significant.

E.g., if you know that two weeks ago, what you had worked, but it doesn't work now, you can use git-bisect to figure out what happened, but first you have to figure out what commit it was that you were using two weeks ago. Two weeks ago, we had that information, but we didn't keep it.

It would probably also be useful for showing changelogs in a locally-useful order. If you merge in a tree that's been in separate development for a long time, the commits in that tree will be interleaved in commit date with the commits you did locally. You tend to want to attribute all of the changes that happened in the merge to the time of the merge, but that commit object isn't going to tell you anything useful, because it may have been done by the other tree (and you fast-forwarded to the merge). In fact, you may want to attribute the changes to the fast-forward, which can't recorded in the content history, because nothing happened to the content. On the other hand, if we were to also record the branch history, we could give output which shows changes in the order they reached the local tree (then ordered by the commit tree), just by having it do:

<time now>
git log <head-as-of-before>..<head-of-of-now>
<time before>
git log <head-as-of-before-that>..<head-as-of-before>
<time before-that>
and so forth.
	-Daniel
*This .sig left intentionally blank*
Next: Linus Torvalds
Message 1 of 21 in “Tracking branch history”
  1. Daniel BarkalowMay 12, 2006
  2. Linus TorvaldsMay 12, 2006
  3. Linus TorvaldsMay 13, 2006
  4. Daniel BarkalowMay 13, 2006
  5. Shawn PearceMay 13, 2006
  6. Linus TorvaldsMay 13, 2006
  7. Junio C HamanoMay 13, 2006
  8. Shawn PearceMay 13, 2006
  9. Shawn PearceMay 13, 2006
  10. Linus TorvaldsMay 13, 2006
  11. Junio C HamanoMay 13, 2006
  12. Shawn PearceMay 13, 2006
  13. Junio C HamanoMay 14, 2006
  14. Shawn PearceMay 15, 2006
  15. Shawn PearceMay 15, 2006
  16. Junio C HamanoMay 15, 2006
  17. Shawn PearceMay 15, 2006
  18. Shawn PearceMay 15, 2006
  19. Linus TorvaldsMay 13, 2006
  20. ElrondMay 13, 2006
  21. Junio C HamanoMay 14, 2006

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.