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

Re: Re* Keeping the original init.defaultBranch config value

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Nov 22, 2020, 19:00 UTC
Message-ID
<nycvar.QRO.7.76.6.2011221958240.56@tvgsbejvaqbjf.bet>
In-Reply-To
<xmqqd00a36wc.fsf@gitster.c.googlers.com>
Hi Junio,
On Wed, 18 Nov 2020, Junio C Hamano wrote:
Show 24 quoted lines
> --- >8 ------ >8 ------ >8 --- cut here --- >8 ------ >8 ---
> Subject: "init" doc: mention the configurability more clearly
>
> Update the description for the '--initial-branch' option to mention
> that the historical default has been `master` and it can be
> configured to use any name.  When actual transition happens to
> another fixed name, say 'main', the description would further be
> updated to mention like:
>
> 	... fall back to the default name 'main', but it can be
> 	customized with the `init.defaultBranch` configuration
> 	variable.  Note that the default name historically was
> 	'master'.
>
> in order to help people who wonder why more mature projects or
> documentation tend not to say 'main'.
>
> While we are at it, stop referring to "HEAD file", which was a
> remnant from 2005 that talks too much about implementation detail.
> The most important fact is that the current branch is set to an
> unborn branch and not detached HEAD.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---

Just to make sure to mention it: I transmogrified this patch into https://lore.kernel.org/git/1518387eaa95098707878459bc74bd5ef2179386.1606087406.git.gitgitgadget@gmail.com/

Thanks, Dscho

Show 34 quoted lines
>  Documentation/git-init.txt | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git i/Documentation/git-init.txt w/Documentation/git-init.txt
> index 59ecda6c17..62c7552a12 100644
> --- i/Documentation/git-init.txt
> +++ w/Documentation/git-init.txt
> @@ -20,8 +20,9 @@ DESCRIPTION
>
>  This command creates an empty Git repository - basically a `.git`
>  directory with subdirectories for `objects`, `refs/heads`,
> -`refs/tags`, and template files.  An initial `HEAD` file that
> -references the HEAD of the master branch is also created.
> +`refs/tags`, and template files.  An unborn branch (see the
> +`--initial-branch` option below for its name) is made to the current
> +branch.
>
>  If the `$GIT_DIR` environment variable is set then it specifies a path
>  to use instead of `./.git` for the base of the repository.
> @@ -73,8 +74,10 @@ If this is reinitialization, the repository will be moved to the specified path.
>  -b <branch-name>::
>  --initial-branch=<branch-name>::
>
> -Use the specified name for the initial branch in the newly created repository.
> -If not specified, fall back to the default name: `master`.
> +Use the specified name for the initial branch in the newly created
> +repository.  If not specified, fall back to the default name
> +'master', but it can be customized with the `init.defaultBranch`
> +configuration variable.
>
>  --shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
>
> o
>
Previous: Junio C Hamano
Message 3 of 3 in “Keeping the original init.defaultBranch config value”
  1. Peter HadlawNov 18, 2020
  2. Re* Keeping the original init.defaultBranch config valueJunio C Hamano, Nov 18, 2020
  3. Johannes SchindelinNov 22, 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.