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

Re: [PATCH] builtin-branch - allow deleting a fully specified branch-name

From
Jeff King <peff@peff.net>
Date
Apr 13, 2009, 08:56 UTC
Message-ID
<20090413085622.GC9846@coredump.intra.peff.net>
In-Reply-To
<7v7i1qb7sw.fsf@gitster.siamese.dyndns.org>
On Sun, Apr 12, 2009 at 01:22:23AM -0700, Junio C Hamano wrote:
Show 12 quoted lines
> > And I can see why you might think of it that way, because that is what
> > the synopsis in git-checkout(1) says. :) But it is really:
> >
> >   git checkout -b <branch> <commit>
> >
> > I'm not sure if changing that synopsis would really help, or if it is
> > a bit too subtle.
> 
> I think in many places we used to be stricter in terminology (e.g. when we
> only need tree-ish we used to write tree-ish) but during the "usability
> and approachiablility drive" people updated doc with "most of the time the
> command takes commit, so we say commit".

Yeah, I think this is one of the fundamental usability debates of git. On one hand, if you assume that the user learns about the object types, the DAG, and refs, then all of this is very straightforward to explain. The price you pay is a steep learning curve. On the other, you can get 95% of what you need done without ever being exposed to the technical details, so I can see why people push for learning materials that gloss over it.

> I think "the apporachable part" aka "synopsis" should be kept the way it
> is, but we should clarify in the description when the most general form is
> different from the white lie we feed to newbies.

Hmm. I tried something in this direction, but I actually think it ended up more confusing.

I think it would be better in the synopsis to split this into two use cases:

  git checkout [<branch>]
  git checkout -b <new_branch> [<start_point>]
And then explain them as separate definitions.
-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 24 in “builtin-branch - allow deleting a fully specified branch-name”
  1. builtin-branch - allow deleting a fully specified branch-nameMark Levedahl, Apr 10, 2009
  2. Junio C HamanoApr 10, 2009
  3. Mark LevedahlApr 10, 2009
  4. Junio C HamanoApr 10, 2009
  5. Mark LevedahlApr 11, 2009
  6. Jeff KingApr 12, 2009
  7. Junio C HamanoApr 12, 2009
  8. Jeff KingApr 13, 2009
  9. Junio C HamanoApr 13, 2009
  10. Jeff KingApr 13, 2009
  11. 1/5 doc: clarify --no-track optionJeff King, Apr 13, 2009
  12. 2/5 doc: refer to tracking configuration as "upstream"Jeff King, Apr 13, 2009
  13. 3/5 doc/checkout: refer to git-branch(1) as appropriateJeff King, Apr 13, 2009
  14. 4/5 doc/checkout: split checkout and branch creation in synopsisJeff King, Apr 13, 2009
  15. 5/5 docs/checkout: clarify what "non-branch" meansJeff King, Apr 13, 2009
  16. Junio C HamanoApr 13, 2009
  17. Mark LevedahlApr 14, 2009
  18. Junio C HamanoApr 14, 2009
  19. Jakub NarebskiApr 14, 2009
  20. Jeff KingApr 15, 2009
  21. Jeff KingApr 15, 2009
  22. Jeff KingApr 13, 2009
  23. Jeff KingApr 13, 2009
  24. Sverre RabbelierApr 13, 2009

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.