Skip to content

Commit 1296cbe

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b291b0a commit 1296cbe

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Documentation/git-init.txt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ DESCRIPTION
2020

2121
This command creates an empty Git repository - basically a `.git`
2222
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).
2526

2627
If the `$GIT_DIR` environment variable is set then it specifies a path
2728
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.
7374
-b <branch-name>::
7475
--initial-branch=<branch-name>::
7576

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).
7881

7982
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
8083

0 commit comments

Comments
 (0)