Skip to content

Commit

Permalink
git-init.txt: move description section up
Browse files Browse the repository at this point in the history
It's more or less standard that synopsis is followed by description,
then options.

This is not just a clean move though:

 - The paragraphs are realigned a bit
 - The text mentioning git-init-db is dropped. init-db is
   deprecated, no need to confuse new users

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Nguyễn Thái Ngọc Duy authored and Junio C Hamano committed Mar 20, 2011
1 parent af4c62a commit 9d379f4
Showing 1 changed file with 20 additions and 26 deletions.
46 changes: 20 additions & 26 deletions Documentation/git-init.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,26 @@ SYNOPSIS
'git init' [-q | --quiet] [--bare] [--template=<template_directory>] [--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.

OPTIONS
-------

Expand Down Expand Up @@ -74,32 +94,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
------------------

Expand Down

0 comments on commit 9d379f4

Please sign in to comment.