summaryrefslogtreecommitdiff
path: root/Documentation/git-init.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-04-02 00:57:37 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-04-02 00:57:37 (GMT)
commitc4b2ce69534e1d51f71142ba0e463ed89605ccd1 (patch)
tree6cb1a1c828b387e14e2e39fc931892a609725527 /Documentation/git-init.txt
parentffc5e3c958b66fb4babeba01483cc924bc2957a5 (diff)
parentb57fb80a7d7d19102b31ab94a28ed43ea1ee07bb (diff)
downloadgit-c4b2ce69534e1d51f71142ba0e463ed89605ccd1.zip
git-c4b2ce69534e1d51f71142ba0e463ed89605ccd1.tar.gz
git-c4b2ce69534e1d51f71142ba0e463ed89605ccd1.tar.bz2
Merge branch 'nd/init-gitdir'
* nd/init-gitdir: init, clone: support --separate-git-dir for .git file git-init.txt: move description section up Conflicts: builtin/clone.c
Diffstat (limited to 'Documentation/git-init.txt')
-rw-r--r--Documentation/git-init.txt61
1 files changed, 34 insertions, 27 deletions
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index 5931925..58cd011 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -8,9 +8,32 @@ git-init - Create an empty git repository or reinitialize an existing one
SYNOPSIS
--------
-'git init' [-q | --quiet] [--bare] [--template=<template_directory>] [--shared[=<permissions>]] [directory]
+'git init' [-q | --quiet] [--bare] [--template=<template_directory>]
+ [--separate-git-dir|-L <git dir>]
+ [--shared[=<permissions>]] [directory]
+DESCRIPTION
+-----------
+
+This command creates an empty git repository - basically a `.git`
+directory with subdirectories for `objects`, `refs/heads`,
+`refs/tags`, and template files. An initial `HEAD` file that
+references the HEAD of the master branch is also created.
+
+If the `$GIT_DIR` environment variable is set then it specifies a path
+to use instead of `./.git` for the base of the repository.
+
+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.
+
+Running 'git init' in an existing repository is safe. It will not
+overwrite things that are already there. The primary reason for
+rerunning 'git init' is to pick up newly added templates (or to move
+the repository to another place if --separate-git-dir is given).
+
OPTIONS
-------
@@ -31,6 +54,16 @@ current working directory.
Specify the directory from which templates will be used. (See the "TEMPLATE
DIRECTORY" section below.)
+-L=<git dir>::
+--separate-git-dir=<git dir>::
+
+Instead of initializing the repository where it is supposed to be,
+place a filesytem-agnostic git symbolic link there, pointing to the
+specified git 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.
+
--shared[=(false|true|umask|group|all|world|everybody|0xxx)]::
Specify that the git repository is to be shared amongst several users. This
@@ -74,32 +107,6 @@ line, the command is run inside the directory (possibly after creating it).
--
-DESCRIPTION
------------
-This command creates an empty git repository - basically a `.git` directory
-with subdirectories for `objects`, `refs/heads`, `refs/tags`, and
-template files.
-An initial `HEAD` file that references the HEAD of the master branch
-is also created.
-
-If the `$GIT_DIR` environment variable is set then it specifies a path
-to use instead of `./.git` for the base of the repository.
-
-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.
-
-Running 'git init' in an existing repository is safe. It will not overwrite
-things that are already there. The primary reason for rerunning 'git init'
-is to pick up newly added templates.
-
-Note that 'git init' is the same as 'git init-db'. The command
-was primarily meant to initialize the object database, but over
-time it has become responsible for setting up the other aspects
-of the repository, such as installing the default hooks and
-setting the configuration variables. The old name is retained
-for backward compatibility reasons.
-
TEMPLATE DIRECTORY
------------------