Skip to content

Commit 133f0a2

Browse files
Grégoire Parisgitster
authored andcommitted
init: document dotfiles exclusion on template copy
Not just . and .., but any path that begins with dot is not copied when copying the template directory to a new repository. You can customize the template directory, copying some dotfiles might make sense, but it's actually a good thing not to, because you would not want to have your git directory copied in every git directory that is created should you decide to put your template directory under version control, for example. Plus, it might be used as a feature by people who would want to exclude some files. Signed-off-by: Grégoire Paris <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 3b9e3c2 commit 133f0a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/git-init.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ does not exist, it will be created.
116116
TEMPLATE DIRECTORY
117117
------------------
118118

119-
The template directory contains files and directories that will be copied to
120-
the `$GIT_DIR` after it is created.
119+
Files and directories in the template directory whose name do not start with a
120+
dot will be copied to the `$GIT_DIR` after it is created.
121121

122122
The template directory will be one of the following (in order):
123123

0 commit comments

Comments
 (0)