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

Re: [RFD] Git glossary: 'branch' and 'head' description

From
Daniel Barkalow <barkalow@iabervon.org>
Date
May 20, 2006, 00:28 UTC
Message-ID
<Pine.LNX.4.64.0605192006400.6713@iabervon.org>
In-Reply-To
<20060519092136.GN22257@spearce.org>
On Fri, 19 May 2006, Shawn Pearce wrote:
Show 20 quoted lines
> David K?gedal <davidk@lysator.liu.se> wrote:
> > I noticed that some of this seems to be changing slightly with the
> > introduction of branch logs, but I don't know how those are supposed
> > to be used yet.
> 
> 	$ git commit -a
> 	$ git pull . some/other-tag
> 	# go to lunch
> 	$ git pull . some/bad-stuff
> 	$ git commit -a
> 	# go home
> 	$ test...
> 	# realize this is all bad
> 	$ git reset --hard "master@{yesterday}"
> 
> :-)
> 
> Its really only useful for recording the history of your ref's state,
> so you can 'undo' a bad merge that you might have done a few days
> ago but not realized was bad until now.

I still think it's useful for presenting a local view of how things have changed. I.e.:

$ git pull . stuff # Notice that the diffstat is exciting # What did I just get? $ git log master@{5 minutes ago}..master

This is about the only easy way to find out that the fast-forward you just did included merging a line which contains a commit from several weeks ago. (Because the "before" state isn't easily accessible for a fast-forward, and the date of the old commit puts it way back in a date-ordered log.)

I still think that a local changelog, which groups the additions due to each logged value, would be a useful way of viewing the history in a way that's meaningful to the particular user, and I think it would fit user expectations of gitweb (i.e., when looking at Linus's tree's summary, things would be ordered by when they hit Linus's tree, not when they were originally committed, so between the listing of the merge at 23:48:54 today and the one 7 minutes before would be those things which weren't in Linus's tree during those 7 minutes).

	-Daniel
*This .sig left intentionally blank*
Previous: Shawn PearceNext: Junio C Hamano
Message 8 of 13 in “[RFD] Git glossary: 'branch' and 'head' description”
  1. Jakub NarebskiMay 17, 2006
  2. Junio C HamanoMay 17, 2006
  3. Jakub NarebskiMay 17, 2006
  4. Junio C HamanoMay 17, 2006
  5. Jakub NarebskiMay 17, 2006
  6. David KågedalMay 19, 2006
  7. Shawn PearceMay 19, 2006
  8. Daniel BarkalowMay 20, 2006
  9. Junio C HamanoMay 20, 2006
  10. Daniel BarkalowMay 20, 2006
  11. Linus TorvaldsMay 20, 2006
  12. Shawn PearceMay 21, 2006
  13. Jakub NarebskiMay 21, 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.