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

Re: Regarding Git and Branch Naming

From
Jeff King <peff@peff.net>
Date
Jun 27, 2020, 03:14 UTC
Message-ID
<20200627031412.GC1187031@coredump.intra.peff.net>
In-Reply-To
<CABPp-BE7y5YD4A+QTn-2Vu5aS8c_pzQ2096Y7GRqeOOSJKwJHQ@mail.gmail.com>
On Fri, Jun 26, 2020 at 02:58:17PM -0700, Elijah Newren wrote:
Show 13 quoted lines
> The error doesn't need to come that late; it could come at the "init"
> step when no branch name is specified.  If that's desirable, a
> necessary first step towards that would be making a plain "git init"
> throw a warning that we are creating a repo with a default branch name
> of <whatever> since the user didn't specify one.
> 
> Of course, we could decide to only take that first step and never
> escalate it to an error.  It'd still leave us with some default name,
> but would de-emphasize it some.
> 
> Not sure if I'm in favor of either of these ideas or not, but just
> thought I'd point out alternate possibilities towards
> removing/de-emphasizing the default initial branch name.

Yeah, I agree those are all possible options. My issue is that not picking a default means the user is forced to do so before continuing, which seems fundamentally unfriendly to me. It's putting more friction between the user and their goal.

The warning version doesn't force that choice, but then I don't think that's it really accomplished that much. We've still got to have a default, and now we have an annoying warning on top. :)

-Peff
Previous: Elijah Newren
Message 9 of 9 in “Re: Regarding Git and Branch Naming”
  1. Craig H MaynardJun 26, 2020
  2. Chris TorekJun 26, 2020
  3. Jeff KingJun 26, 2020
  4. Junio C HamanoJun 26, 2020
  5. Jeff KingJun 27, 2020
  6. Philip OakleyJun 26, 2020
  7. Jeff KingJun 27, 2020
  8. Elijah NewrenJun 26, 2020
  9. Jeff KingJun 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.