summaryrefslogtreecommitdiffstats
path: root/git-init.html
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-09-09 14:16:17 -0700
committerJunio C Hamano <gitster@pobox.com>2014-09-09 14:16:17 -0700
commit53fe031ef8167aa5a2d2d804524f4442cdc52658 (patch)
treef791fafca81406aec677e6db6628ed5239776cdc /git-init.html
parent8a1433ae1d12e8d860cd3bb9ef4c41c035c7b920 (diff)
downloadgit-htmldocs-53fe031ef8167aa5a2d2d804524f4442cdc52658.tar.gz
Autogenerated HTML docs for v2.1.0-127-g0c72b
Diffstat (limited to 'git-init.html')
-rw-r--r--git-init.html118
1 files changed, 67 insertions, 51 deletions
diff --git a/git-init.html b/git-init.html
index b4e8f7675..541c66302 100644
--- a/git-init.html
+++ b/git-init.html
@@ -790,7 +790,7 @@ the repository to another place if --separate-git-dir is given).</p></div>
</dt>
<dd>
<p>
-Only print error and warning messages, all other output will be suppressed.
+Only print error and warning messages; all other output will be suppressed.
</p>
</dd>
<dt class="hdlist1">
@@ -816,13 +816,12 @@ DIRECTORY" section below.)
</dt>
<dd>
<p>
-Instead of initializing the repository where it is supposed to be,
-place a filesytem-agnostic Git symbolic link there, pointing to the
-specified path, and initialize a Git repository at the path. The
-result is Git repository can be separated from working tree. If this
-is reinitialization, the repository will be moved to the specified
-path.
+Instead of initializing the repository as a directory to either <tt>$GIT_DIR</tt> or
+<tt>./.git/</tt>, create a text file there containing the path to the actual
+repository. This file acts as filesystem-agnostic Git symbolic link to the
+repository.
</p>
+<div class="paragraph"><p>If this is reinitialization, the repository will be moved to the specified path.</p></div>
</dd>
<dt class="hdlist1">
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]
@@ -836,50 +835,62 @@ set so that files and directories under <tt>$GIT_DIR</tt> are created with the
requested permissions. When not specified, Git will use permissions reported
by umask(2).
</p>
-</dd>
-</dl></div>
<div class="paragraph"><p>The option can have the following values, defaulting to <em>group</em> if no value
is given:</p></div>
-<div class="ulist"><ul>
-<li>
+<div class="openblock">
+<div class="content">
+<div class="dlist"><dl>
+<dt class="hdlist1">
+<em>umask</em> (or <em>false</em>)
+</dt>
+<dd>
<p>
-<em>umask</em> (or <em>false</em>): Use permissions reported by umask(2). The default,
- when <tt>--shared</tt> is not specified.
+Use permissions reported by umask(2). The default, when <tt>--shared</tt> is not
+specified.
</p>
-</li>
-<li>
+</dd>
+<dt class="hdlist1">
+<em>group</em> (or <em>true</em>)
+</dt>
+<dd>
<p>
-<em>group</em> (or <em>true</em>): Make the repository group-writable, (and g+sx, since
- the git group may be not the primary group of all users).
- This is used to loosen the permissions of an otherwise safe umask(2) value.
- Note that the umask still applies to the other permission bits (e.g. if
- umask is <em>0022</em>, using <em>group</em> will not remove read privileges from other
- (non-group) users). See <em>0xxx</em> for how to exactly specify the repository
- permissions.
+Make the repository group-writable, (and g+sx, since the git group may be not
+the primary group of all users). This is used to loosen the permissions of an
+otherwise safe umask(2) value. Note that the umask still applies to the other
+permission bits (e.g. if umask is <em>0022</em>, using <em>group</em> will not remove read
+privileges from other (non-group) users). See <em>0xxx</em> for how to exactly specify
+the repository permissions.
</p>
-</li>
-<li>
+</dd>
+<dt class="hdlist1">
+<em>all</em> (or <em>world</em> or <em>everybody</em>)
+</dt>
+<dd>
<p>
-<em>all</em> (or <em>world</em> or <em>everybody</em>): Same as <em>group</em>, but make the repository
- readable by all users.
+Same as <em>group</em>, but make the repository readable by all users.
</p>
-</li>
-<li>
+</dd>
+<dt class="hdlist1">
+<em>0xxx</em>
+</dt>
+<dd>
<p>
-<em>0xxx</em>: <em>0xxx</em> is an octal number and each file will have mode <em>0xxx</em>.
- <em>0xxx</em> will override users' umask(2) value (and not only loosen permissions
- as <em>group</em> and <em>all</em> does). <em>0640</em> will create a repository which is
- group-readable, but not group-writable or accessible to others. <em>0660</em> will
- create a repo that is readable and writable to the current user and group,
- but inaccessible to others.
+<em>0xxx</em> is an octal number and each file will have mode <em>0xxx</em>. <em>0xxx</em> will
+override users' umask(2) value (and not only loosen permissions as <em>group</em> and
+<em>all</em> does). <em>0640</em> will create a repository which is group-readable, but not
+group-writable or accessible to others. <em>0660</em> will create a repo that is
+readable and writable to the current user and group, but inaccessible to others.
</p>
-</li>
-</ul></div>
-<div class="paragraph"><p>By default, the configuration flag receive.denyNonFastForwards is enabled
+</dd>
+</dl></div>
+</div></div>
+</dd>
+</dl></div>
+<div class="paragraph"><p>By default, the configuration flag <tt>receive.denyNonFastForwards</tt> is enabled
in shared repositories, so that you cannot force a non fast-forwarding push
into it.</p></div>
-<div class="paragraph"><p>If you name a (possibly non-existent) directory at the end of the command
-line, the command is run inside the directory (possibly after creating it).</p></div>
+<div class="paragraph"><p>If you provide a <em>directory</em>, the command is run inside it. If this directory
+does not exist, it will be created.</p></div>
</div></div>
</div>
</div>
@@ -888,32 +899,31 @@ line, the command is run inside the directory (possibly after creating it).</p><
<div class="sectionbody">
<div class="paragraph"><p>The template directory contains files and directories that will be copied to
the <tt>$GIT_DIR</tt> after it is created.</p></div>
-<div class="paragraph"><p>The template directory used will (in order):</p></div>
+<div class="paragraph"><p>The template directory will be one of the following (in order):</p></div>
<div class="ulist"><ul>
<li>
<p>
-The argument given with the <tt>--template</tt> option.
+the argument given with the <tt>--template</tt> option;
</p>
</li>
<li>
<p>
-The contents of the <tt>$GIT_TEMPLATE_DIR</tt> environment variable.
+the contents of the <tt>$GIT_TEMPLATE_DIR</tt> environment variable;
</p>
</li>
<li>
<p>
-The <tt>init.templatedir</tt> configuration variable.
+the <tt>init.templatedir</tt> configuration variable; or
</p>
</li>
<li>
<p>
-The default template directory: <tt>/usr/share/git-core/templates</tt>.
+the default template directory: <tt>/usr/share/git-core/templates</tt>.
</p>
</li>
</ul></div>
-<div class="paragraph"><p>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.</p></div>
+<div class="paragraph"><p>The default template directory includes some directory structure, suggested
+"exclude patterns" (see <a href="gitignore.html">gitignore(5)</a>), and sample hook files (see <a href="githooks.html">githooks(5)</a>).</p></div>
</div>
</div>
<div class="sect1">
@@ -928,17 +938,23 @@ Start a new Git repository for an existing code base
<div class="content">
<pre><tt>$ cd /path/to/my/codebase
$ git init <b>&lt;1&gt;</b>
-$ git add . <b>&lt;2&gt;</b></tt></pre>
+$ git add . <b>&lt;2&gt;</b>
+$ git commit <b>&lt;3&gt;</b></tt></pre>
</div></div>
<div class="colist arabic"><ol>
<li>
<p>
-prepare /path/to/my/codebase/.git directory
+Create a /path/to/my/codebase/.git directory.
+</p>
+</li>
+<li>
+<p>
+Add all existing files to the index.
</p>
</li>
<li>
<p>
-add all existing file to the index
+Record the pristine state as the first commit in the history.
</p>
</li>
</ol></div>
@@ -956,7 +972,7 @@ add all existing file to the index
<div id="footnotes"><hr /></div>
<div id="footer">
<div id="footer-text">
-Last updated 2013-08-20 08:40:27 PDT
+Last updated 2014-09-09 14:15:21 PDT
</div>
</div>
</body>