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

Re: nicer frontend to get rebased tree?

From
Björn Steinbrink <b.steinbrink@gmx.de>
Date
Aug 23, 2008, 20:08 UTC
Message-ID
<20080823200845.GA17374@atjola.homenet>
In-Reply-To
<alpine.LFD.1.10.0808231152250.3363@nehalem.linux-foundation.org>
On 2008.08.23 11:56:27 -0700, Linus Torvalds wrote:
Show 11 quoted lines
> On Sat, 23 Aug 2008, Björn Steinbrink wrote:
> > So, how would you make it less obscure and unobvious then the current
> > method? The current method would be:
> > 
> > git fetch linux-next
> > git checkout linux-next/whatever
> > 
> > Which seems neither obscure nor unobvious to me...
> 
> One thing that I admit we haven't done is _document_ this in some
> obvious place.

One thing I experienced in #git is that people seem to have problems understanding remote tracking branches like linux-next/whatever in the above example. Quite often, there have been requests like:

 How can I pull into all of my branches at once?

And after some back and forth about pull being fetch+merge and that you can only merge into your current branch etc. it usually turns out that those folks just have a local branch for each remote tracking branch, even if all they want is just the state of the remote tracking branch anyway.

So they end up doing stuff like:

git checkout foo git pull git checkout my_work_on_top_of_foo git rebase foo

Where "foo" is always just fast-forwarded to origin/foo.

So I think a major part of the problem is that remote tracking branches are not understood or at least not valued enough. Unfortunately, I have no real idea how we could improve that.

Once on #git, I explained how branches (ie. the refs in refs/heads) are special and that HEAD becomes a symbolic ref when you check them out, while it becomes a plain reference to a commit when you check out something else (tag, remote tracking branch, commit, whatever). And that operations like commit dereference HEAD until they find a non-symbolic ref and update _that_ ref. I think that explanation worked quite well for the person I was talking to and made him realize that you only need branches when you really want create your own commits. But OTOH, telling people that local branches are the actual special case might as well confuse the hell out of them (me thinks). And besides that, I'm no good at writing "static" documentation anyway.

Björn
Previous: Linus TorvaldsNext: Marius Vollmer
Message 21 of 42 in “nicer frontend to get rebased tree?”
  1. Andi KleenAug 22, 2008
  2. Linus TorvaldsAug 22, 2008
  3. Andi KleenAug 22, 2008
  4. Linus TorvaldsAug 22, 2008
  5. Paolo CiarrocchiAug 22, 2008
  6. Linus TorvaldsAug 22, 2008
  7. Björn SteinbrinkAug 22, 2008
  8. Paolo CiarrocchiAug 22, 2008
  9. Linus TorvaldsAug 22, 2008
  10. Junio C HamanoAug 22, 2008
  11. Andi KleenAug 23, 2008
  12. Paolo BonziniAug 23, 2008
  13. Andi KleenAug 23, 2008
  14. Paolo BonziniAug 23, 2008
  15. Linus TorvaldsAug 23, 2008
  16. Andi KleenAug 23, 2008
  17. Linus TorvaldsAug 23, 2008
  18. Ingo MolnarAug 25, 2008
  19. Björn SteinbrinkAug 23, 2008
  20. Linus TorvaldsAug 23, 2008
  21. Björn SteinbrinkAug 23, 2008
  22. Documentating branches (was: nicer frontend to get rebased tree?)Marius Vollmer, Aug 23, 2008
  23. Miklos VajnaAug 23, 2008
  24. Marius VollmerAug 23, 2008
  25. Marius VollmerAug 23, 2008
  26. Avery PennarunAug 22, 2008
  27. Andi KleenAug 22, 2008
  28. Paolo CiarrocchiAug 22, 2008
  29. Jakub NarebskiAug 22, 2008
  30. Andi KleenAug 23, 2008
  31. Paolo CiarrocchiAug 23, 2008
  32. Jakub NarebskiAug 23, 2008
  33. Andi KleenAug 23, 2008
  34. Paolo CiarrocchiAug 23, 2008
  35. Linus TorvaldsAug 23, 2008
  36. Paolo CiarrocchiAug 23, 2008
  37. Björn SteinbrinkAug 23, 2008
  38. Junio C HamanoAug 24, 2008
  39. Jakub NarebskiAug 23, 2008
  40. Theodore TsoAug 23, 2008
  41. A proposed solution (Was: nicer frontend to get rebased tree?)Theodore Tso, Aug 23, 2008
  42. Mikael MagnussonAug 22, 2008

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.