31f92d9fef9f00a2aec91ce02a8d3d5b488114ea
[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>]
27
28 .SH "OPTIONS"
29
30 .TP
31 \-\-template=<template_directory>
32 Provide the directory in from which templates will be used\&.
33
34 .SH "DESCRIPTION"
35
36
37 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\&.
38
39
40 If the $GIT_DIR environment variable is set then it specifies a path to use instead of \&./\&.git for the base of the repository\&.
41
42
43 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\&.
44
45
46 git\-init\-db won't hurt an existing repository\&.
47
48 .SH "EXAMPLES"
49
50 .TP
51 Start a new git repository for an existing code base
52
53 .IP
54 $ cd /path/to/my/codebase
55 $ git\-init\-db 
56 $ git\-add \&. 
57
58  prepare /path/to/my/codebase/\&.git directory
59  add all existing file to the index
60 .SH "AUTHOR"
61
62
63 Written by Linus Torvalds <torvalds@osdl\&.org>
64
65 .SH "DOCUMENTATION"
66
67
68 Documentation by David Greaves, Junio C Hamano and the git\-list <git@vger\&.kernel\&.org>\&.
69
70 .SH "GIT"
71
72
73 Part of the \fBgit\fR(7) suite
74