format-patch: allow --range-diff to apply to a lone-patch
[gitweb.git] / Documentation / git-init.txt
index 9f2c7d84848949425fed5aeba8c9e5b587e384fa..3c5a67fb9671f8c65e0830222c63bb5035a05c30 100644 (file)
@@ -47,7 +47,7 @@ Only print error and warning messages; all other output will be suppressed.
 
 --bare::
 
-Create a bare repository. If GIT_DIR environment is not set, it is set to the
+Create a bare repository. If `GIT_DIR` environment is not set, it is set to the
 current working directory.
 
 --template=<template_directory>::
@@ -116,8 +116,8 @@ does not exist, it will be created.
 TEMPLATE DIRECTORY
 ------------------
 
-The template directory contains files and directories that will be copied to
-the `$GIT_DIR` after it is created.
+Files and directories in the template directory whose name do not start with a
+dot will be copied to the `$GIT_DIR` after it is created.
 
 The template directory will be one of the following (in order):
 
@@ -125,12 +125,17 @@ The template directory will be one of the following (in order):
 
  - the contents of the `$GIT_TEMPLATE_DIR` environment variable;
 
- - the `init.templatedir` configuration variable; or
+ - the `init.templateDir` configuration variable; or
 
  - the default template directory: `/usr/share/git-core/templates`.
 
 The default template directory includes some directory structure, suggested
-"exclude patterns" (see linkgit:gitignore[5]), and sample hook files (see linkgit:githooks[5]).
+"exclude patterns" (see linkgit:gitignore[5]), and sample hook files.
+
+The sample hooks are all disabled by default, To enable one of the
+sample hooks rename it by removing its `.sample` suffix.
+
+See linkgit:githooks[5] for more general info on hook execution.
 
 EXAMPLES
 --------
@@ -141,10 +146,12 @@ Start a new Git repository for an existing code base::
 $ cd /path/to/my/codebase
 $ git init      <1>
 $ git add .     <2>
+$ git commit    <3>
 ----------------
 +
 <1> Create a /path/to/my/codebase/.git directory.
 <2> Add all existing files to the index.
+<3> Record the pristine state as the first commit in the history.
 
 GIT
 ---