Skip to content

Commit

Permalink
Add a "TEMPLATE DIRECTORY" section to git-init[1].
Browse files Browse the repository at this point in the history
Create a more inoformative section to describe template directory and
refer to it in config.txt and with the '--template' option of git-init
and git-clone commands.

Signed-off-by: Steven Drake <sdrake@xnet.co.nz>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Steven Drake authored and Junio C Hamano committed Feb 17, 2010
1 parent 90b4518 commit d8a8488
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 10 deletions.
4 changes: 4 additions & 0 deletions Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1200,6 +1200,10 @@ imap::
The configuration variables in the 'imap' section are described
in linkgit:git-imap-send[1].

init.templatedir::
Specify the directory from which templates will be copied.
(See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)

instaweb.browser::
Specify the program that will be used to browse your working
repository in gitweb. See linkgit:git-instaweb[1].
Expand Down
3 changes: 1 addition & 2 deletions Documentation/git-clone.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,7 @@ objects from the source repository into a pack in the cloned repository.

--template=<template_directory>::
Specify the directory from which templates will be used;
if unset the templates are taken from the installation
defined default, typically `/usr/share/git-core/templates`.
(See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)

--depth <depth>::
Create a 'shallow' clone with a history truncated to the
Expand Down
29 changes: 21 additions & 8 deletions Documentation/git-init.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,8 @@ current working directory.

--template=<template_directory>::

Provide the directory from which templates will be used. The default template
directory is `/usr/share/git-core/templates`.

When specified, `<template_directory>` is used as the source of the template
files rather than the default. The template files include some directory
structure, some suggested "exclude patterns", and copies of non-executing
"hook" files. The suggested patterns and hook files are all modifiable and
extensible.
Specify the directory from which templates will be used. (See the "TEMPLATE
DIRECTORY" section below.)

--shared[={false|true|umask|group|all|world|everybody|0xxx}]::

Expand Down Expand Up @@ -106,6 +100,25 @@ of the repository, such as installing the default hooks and
setting the configuration variables. The old name is retained
for backward compatibility reasons.

TEMPLATE DIRECTORY
------------------

The template directory contains files and directories that will be copied to
the `$GIT_DIR` after it is created.

The template directory used will (in order):

- The argument given with the `--template` option.

- The contents of the `$GIT_TEMPLATE_DIR` environment variable.

- The `init.templatedir` configuration variable.

- The default template directory: `/usr/share/git-core/templates`.

The default template directory includes some directory structure, some
suggested "exclude patterns", and copies of sample "hook" files.
The suggested patterns and hook files are all modifiable and extensible.

EXAMPLES
--------
Expand Down

0 comments on commit d8a8488

Please sign in to comment.