Skip to content

Commit 81ea3ce

Browse files
Jon LoeligerJunio C Hamano
authored andcommitted
Document the default source of template files.
Also explain a bit more about how the template option works. Signed-off-by: Jon Loeliger <jdl@jdl.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent dd18111 commit 81ea3ce

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

Documentation/git-init-db.txt

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,26 @@ SYNOPSIS
1414
OPTIONS
1515
-------
1616
--template=<template_directory>::
17-
Provide the directory in from which templates will be used.
17+
Provide the directory from which templates will be used.
18+
The default template directory is `/usr/share/git-core/templates`.
1819

1920
--shared::
2021
Specify that the git repository is to be shared amongst several users.
2122

2223

2324
DESCRIPTION
2425
-----------
25-
This simply creates an empty git repository - basically a `.git` directory
26-
and `.git/object/??/`, `.git/refs/heads` and `.git/refs/tags` directories,
27-
and links `.git/HEAD` symbolically to `.git/refs/heads/master`.
26+
This command creates an empty git repository - basically a `.git` directory
27+
with subdirectories for `objects`, `refs/heads`, `refs/tags`, and
28+
templated files.
29+
An initial `HEAD` file that references the HEAD of the master branch
30+
is also created.
31+
32+
If `--template=<template_directory>` is specified, `<template_directory>`
33+
is used as the source of the template files rather than the default.
34+
The template files include some directory structure, some suggested
35+
"exclude patterns", and copies of non-executing "hook" files. The
36+
suggested patterns and hook files are all modifiable and extensible.
2837

2938
If the `$GIT_DIR` environment variable is set then it specifies a path
3039
to use instead of `./.git` for the base of the repository.
@@ -38,7 +47,6 @@ repository. When specifying `--shared` the config variable "core.sharedRepositor
3847
is set to 'true' so that directories under `$GIT_DIR` are made group writable
3948
(and g+sx, since the git group may be not the primary group of all users).
4049

41-
4250
Running `git-init-db` in an existing repository is safe. It will not overwrite
4351
things that are already there. The primary reason for rerunning `git-init-db`
4452
is to pick up newly added templates.

0 commit comments

Comments
 (0)