init: document `init.defaultBranch` better
Our documentation does not mention any future plan to change 'master' to other value. It is a good idea to document this, though. Initial-patch-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Johannes Schindelin committed
Dec 11, 2020 at 11:36 UTC
1296cbe4b4675f429eb20b85bb86ec61546103fb
1 file changed
+7
-4
Documentation/git-init.txt
+7
-4
@@ -20,8 +20,9 @@ DESCRIPTION
20
21
This command creates an empty Git repository - basically a `.git`
22
directory with subdirectories for `objects`, `refs/heads`,
23
-`refs/tags`, and template files. An initial `HEAD` file that
24
-references the HEAD of the master branch is also created.
23
+`refs/tags`, and template files. An initial branch without any
24
+commits will be created (see the `--initial-branch` option below
25
+for its name).
26
27
If the `$GIT_DIR` environment variable is set then it specifies a path
28
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.
74
-b <branch-name>::
75
--initial-branch=<branch-name>::
76
76
-Use the specified name for the initial branch in the newly created repository.
77
-If not specified, fall back to the default name: `master`.
77
+Use the specified name for the initial branch in the newly created
78
+repository. If not specified, fall back to the default name (currently
79
+`master`, but this is subject to change in the future; the name can be
80
+customized via the `init.defaultBranch` configuration variable).
81
82
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
83