diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-03-21 16:30:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-03-21 16:30:09 -0700 |
commit | fd4c4dc9f73ff03dad1eb33a5ec51e32dfcb2b4b (patch) | |
tree | e5387f415febd947e7c030cf87b5f5fa643aa17e /git-init.txt | |
parent | 14bbea308b8f4813af1010e5f9073446365652df (diff) | |
download | git-htmldocs-fd4c4dc9f73ff03dad1eb33a5ec51e32dfcb2b4b.tar.gz |
Autogenerated HTML docs for v2.44.0-325-g11c82
Diffstat (limited to 'git-init.txt')
-rw-r--r-- | git-init.txt | 54 |
1 files changed, 30 insertions, 24 deletions
diff --git a/git-init.txt b/git-init.txt index e8dc645bb..2f864e11e 100644 --- a/git-init.txt +++ b/git-init.txt @@ -33,10 +33,10 @@ If the object storage directory is specified via the are created underneath; otherwise, the default `$GIT_DIR/objects` directory is used. -Running 'git init' in an existing repository is safe. It will not +Running `git init` in an existing repository is safe. It will not overwrite things that are already there. The primary reason for -rerunning 'git init' is to pick up newly added templates (or to move -the repository to another place if --separate-git-dir is given). +rerunning `git init` is to pick up newly added templates (or to move +the repository to another place if `--separate-git-dir` is given). OPTIONS ------- @@ -53,14 +53,14 @@ 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. +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[] --ref-format=<format>:: -Specify the given ref storage format for the repository. The valid values are: +Specify the given ref storage _<format>_ for the repository. The valid values are: + include::ref-storage-format.txt[] @@ -81,7 +81,7 @@ If this is a reinitialization, the repository will be moved to the specified pat -b <branch-name>:: --initial-branch=<branch-name>:: -Use the specified name for the initial branch in the newly created +Use _<branch-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). @@ -90,40 +90,44 @@ customized via the `init.defaultBranch` configuration variable). Specify that the Git repository is to be shared amongst several users. This allows users belonging to the same group to push into that -repository. When specified, the config variable "core.sharedRepository" is +repository. When specified, the config variable `core.sharedRepository` is set so that files and directories under `$GIT_DIR` are created with the requested permissions. When not specified, Git will use permissions reported -by umask(2). +by `umask(2)`. + -The option can have the following values, defaulting to 'group' if no value +The option can have the following values, defaulting to `group` if no value is given: + -- -'umask' (or 'false'):: +umask:: +false:: Use permissions reported by umask(2). The default, when `--shared` is not specified. -'group' (or 'true'):: +group:: +true:: Make the repository group-writable, (and g+sx, since the git group may not be the primary group of all users). This is used to loosen the permissions of an otherwise safe umask(2) value. Note that the umask still applies to the other -permission bits (e.g. if umask is '0022', using 'group' will not remove read -privileges from other (non-group) users). See '0xxx' for how to exactly specify +permission bits (e.g. if umask is `0022`, using `group` will not remove read +privileges from other (non-group) users). See `0xxx` for how to exactly specify the repository permissions. -'all' (or 'world' or 'everybody'):: +all:: +world:: +everybody:: -Same as 'group', but make the repository readable by all users. +Same as `group`, but make the repository readable by all users. -'<perm>':: +<perm>:: -'<perm>' is a 3-digit octal number prefixed with `0` and each file -will have mode '<perm>'. '<perm>' will override users' umask(2) -value (and not only loosen permissions as 'group' and 'all' -do). '0640' will create a repository which is group-readable, but -not group-writable or accessible to others. '0660' will create a repo +_<perm>_ is a 3-digit octal number prefixed with `0` and each file +will have mode _<perm>_. _<perm>_ will override users'`umask(2)` +value (and not only loosen permissions as `group` and `all` +do). `0640` will create a repository which is group-readable, but +not group-writable or accessible to others. `0660` will create a repo that is readable and writable to the current user and group, but inaccessible to others (directories and executable files get their `x` bit from the `r` bit for corresponding classes of users). @@ -133,7 +137,7 @@ By default, the configuration flag `receive.denyNonFastForwards` is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it. -If you provide a 'directory', the command is run inside it. If this directory +If you provide a _<directory>_, the command is run inside it. If this directory does not exist, it will be created. TEMPLATE DIRECTORY @@ -172,7 +176,7 @@ $ git add . <2> $ git commit <3> ---------------- + -<1> Create a /path/to/my/codebase/.git directory. +<1> Create a `/path/to/my/codebase/.git` directory. <2> Add all existing files to the index. <3> Record the pristine state as the first commit in the history. @@ -181,6 +185,8 @@ CONFIGURATION include::includes/cmd-config-section-all.txt[] +:git-init: + include::config/init.txt[] GIT |