diff options
Diffstat (limited to 'Documentation/git-init.txt')
-rw-r--r-- | Documentation/git-init.txt | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 32880aafb0..b611d80697 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -10,7 +10,8 @@ SYNOPSIS -------- [verse] 'git init' [-q | --quiet] [--bare] [--template=<template_directory>] - [--separate-git-dir <git dir>] + [--separate-git-dir <git dir>] [--object-format=<format>] + [-b <branch-name> | --initial-branch=<branch-name>] [--shared[=<permissions>]] [directory] @@ -19,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. @@ -48,6 +50,13 @@ Only print error and warning messages; all other output will be suppressed. Create a bare repository. If `GIT_DIR` environment is not set, it is set to the current working directory. +--object-format=<format>:: + +Specify the given object format (hash algorithm) for the repository. The valid +values are 'sha1' and (if enabled) 'sha256'. 'sha1' is the default. ++ +include::object-format-disclaimer.txt[] + --template=<template_directory>:: Specify the directory from which templates will be used. (See the "TEMPLATE @@ -62,6 +71,14 @@ repository. + 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 (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)]:: Specify that the Git repository is to be shared amongst several users. This |