doc: git-init: format verbatim parts

Verbatim parts are all formatted as `fixed font`.

Signed-off-by: Jean-Noël Avila <jn.avila@free.fr>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jean-Noël Avila
2024-03-10 19:10:25 +00:00
committed by Junio C Hamano
parent 3c2a3fdc38
commit 2261d81490

View File

@ -33,10 +33,10 @@ If the object storage directory is specified via the
are created underneath; otherwise, the default `$GIT_DIR/objects` are created underneath; otherwise, the default `$GIT_DIR/objects`
directory is used. 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 overwrite things that are already there. The primary reason for
rerunning 'git init' is to pick up newly added templates (or to move rerunning `git init` is to pick up newly added templates (or to move
the repository to another place if --separate-git-dir is given). the repository to another place if `--separate-git-dir` is given).
OPTIONS OPTIONS
------- -------
@ -53,8 +53,8 @@ current working directory.
--object-format=<format>:: --object-format=<format>::
Specify the given object format (hash algorithm) for the repository. The valid Specify the given object _<format>_ (hash algorithm) for the repository. The valid
values are 'sha1' and (if enabled) 'sha256'. 'sha1' is the default. values are `sha1` and (if enabled) `sha256`. `sha1` is the default.
+ +
include::object-format-disclaimer.txt[] include::object-format-disclaimer.txt[]
@ -90,12 +90,12 @@ customized via the `init.defaultBranch` configuration variable).
Specify that the Git repository is to be shared amongst several users. This Specify that the Git repository is to be shared amongst several users. This
allows users belonging to the same group to push into that 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 set so that files and directories under `$GIT_DIR` are created with the
requested permissions. When not specified, Git will use permissions reported 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: is given:
+ +
-- --
@ -109,21 +109,21 @@ specified.
Make the repository group-writable, (and g+sx, since the git group may not be 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 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 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 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 privileges from other (non-group) users). See `0xxx` for how to exactly specify
the repository permissions. the repository permissions.
'all' (or 'world' or 'everybody'):: 'all' (or 'world' or '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 '<perm>' is a 3-digit octal number prefixed with `0` and each file
will have mode '<perm>'. '<perm>' will override users' umask(2) will have mode '<perm>'. '<perm>' will override users'`umask(2)`
value (and not only loosen permissions as 'group' and 'all' value (and not only loosen permissions as `group` and `all`
do). '0640' will create a repository which is group-readable, but do). `0640` will create a repository which is group-readable, but
not group-writable or accessible to others. '0660' will create a repo not group-writable or accessible to others. `0660` will create a repo
that is readable and writable to the current user and group, but that is readable and writable to the current user and group, but
inaccessible to others (directories and executable files get their inaccessible to others (directories and executable files get their
`x` bit from the `r` bit for corresponding classes of users). `x` bit from the `r` bit for corresponding classes of users).
@ -172,7 +172,7 @@ $ git add . <2>
$ git commit <3> $ 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. <2> Add all existing files to the index.
<3> Record the pristine state as the first commit in the history. <3> Record the pristine state as the first commit in the history.