Autogenerated man pages for 026351a03507dc3a2e89e068c01234dc55914df2
[git.git] / man1 / git-init-db.1
1 .\"Generated by db2man.xsl. Don't modify this, modify the source.
2 .de Sh \" Subsection
3 .br
4 .if t .Sp
5 .ne 5
6 .PP
7 \fB\\$1\fR
8 .PP
9 ..
10 .de Sp \" Vertical space (when we can't use .PP)
11 .if t .sp .5v
12 .if n .sp
13 ..
14 .de Ip \" List item
15 .br
16 .ie \\n(.$>=3 .ne \\$3
17 .el .ne 3
18 .IP "\\$1" \\$2
19 ..
20 .TH "GIT-INIT-DB" 1 "" "" ""
21 .SH NAME
22 git-init-db \- Creates an empty git repository
23 .SH "SYNOPSIS"
24
25
26 git\-init\-db [\-\-template=<template_directory>] [\-\-shared]
27
28 .SH "OPTIONS"
29
30 .TP
31 \-\-template=<template_directory>
32 Provide the directory in from which templates will be used\&.
33
34 .TP
35 \-\-shared
36 Specify that the git repository is to be shared amongst several users\&.
37
38 .SH "DESCRIPTION"
39
40
41 This simply creates an empty git repository \- basically a \&.git directory and \&.git/object/??/, \&.git/refs/heads and \&.git/refs/tags directories, and links \&.git/HEAD symbolically to \&.git/refs/heads/master\&.
42
43
44 If the $GIT_DIR environment variable is set then it specifies a path to use instead of \&./\&.git for the base of the repository\&.
45
46
47 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\&.
48
49
50 A shared repository allows users belonging to the same group to push into that repository\&. When specifying \-\-shared the config variable "core\&.sharedRepository" is set to true so that directories under $GIT_DIR are made group writable (and g+sx, since the git group may be not the primary group of all users)\&.
51
52
53 Running git\-init\-db in an existing repository is safe\&. It will not overwrite things that are already there\&. The primary reason for rerunning git\-init\-db is to pick up newly added templates\&.
54
55 .SH "EXAMPLES"
56
57 .TP
58 Start a new git repository for an existing code base
59
60 .IP
61 $ cd /path/to/my/codebase
62 $ git\-init\-db 
63 $ git\-add \&. 
64
65  prepare /path/to/my/codebase/\&.git directory
66  add all existing file to the index
67 .SH "AUTHOR"
68
69
70 Written by Linus Torvalds <torvalds@osdl\&.org>
71
72 .SH "DOCUMENTATION"
73
74
75 Documentation by David Greaves, Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
76
77 .SH "GIT"
78
79
80 Part of the \fBgit\fR(7) suite
81