Add a "TEMPLATE DIRECTORY" section to git-init[1].
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>
maint
Steven Drake15 years agocommitted byJunio C Hamano
@ -149,8 +149,7 @@ objects from the source repository into a pack in the cloned repository.
@@ -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
@ -106,6 +100,25 @@ of the repository, such as installing the default hooks and
@@ -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.