X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-init.txt;h=246b07ebf94394d2079c2acc3e8c1a2e6c40bba9;hb=6070bac82a1e9c61d86f8ad2fb282ebb62d1c5d6;hp=f081b24d9d8233677388d437b8f7e6d9402b261b;hpb=a07b10c8f930e88386d3b7424f25190af554275e;p=git.git diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index f081b24d9..246b07ebf 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -28,14 +28,8 @@ current working directory. --template=:: -Provide the directory from which templates will be used. The default template -directory is `/usr/share/git-core/templates`. - -When specified, `` 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}]:: @@ -95,17 +89,36 @@ If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY` environment variable then the sha1 directories are created underneath - otherwise the default `$GIT_DIR/objects` directory is used. -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' +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. -Note that 'git-init' is the same as 'git-init-db'. The command +Note that 'git init' is the same as 'git init-db'. The command was primarily meant to initialize the object database, but over time it has become responsible for setting up the other aspects 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 --------