diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-12-19 02:15:17 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-12-19 02:15:17 +0300 |
commit | 772bdcd4296b259d52aafb0badd79872e9db3bb3 (patch) | |
tree | dac15d162ac6aae28d0e3cfdd287d66767621c21 /Documentation | |
parent | f4d8e191230b3d233005720085092b97e9bf32f1 (diff) | |
parent | 675704c74dd4476f455bfa91e72eb9e163317c10 (diff) |
Merge branch 'js/init-defaultbranch-advice'
Our users are going to be trained to prepare for future change of
init.defaultBranch configuration variable.
* js/init-defaultbranch-advice:
init: provide useful advice about init.defaultBranch
get_default_branch_name(): prepare for showing some advice
branch -m: allow renaming a yet-unborn branch
init: document `init.defaultBranch` better
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/git-init.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 59ecda6c17..b611d80697 100644 --- a/Documentation/git-init.txt +++ b/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 initial branch without any +commits will be created (see the `--initial-branch` option below +for its name). 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 (currently +`master`, but this is subject to change in the future; the name can be +customized via the `init.defaultBranch` configuration variable). --shared[=(false|true|umask|group|all|world|everybody|0xxx)]:: |