git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] git-init.txt: move description section up

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Mar 19, 2011, 15:16 UTC
Message-ID
<1300547816-4768-1-git-send-email-pclouds@gmail.com>

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>
---
 Documentation/git-init.txt |   46 +++++++++++++++++++------------------------
 1 files changed, 20 insertions(+), 26 deletions(-)
diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt
index 5931925..0a4a20e 100644
--- a/Documentation/git-init.txt
+++ b/Documentation/git-init.txt
@@ -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
 -------
 
@@ -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
 ------------------
 
-- 
1.7.4.74.g639db
Next: Nguyễn Thái Ngọc Duy
Message 1 of 4 in “git-init.txt: move description section up”
  1. 1/2 git-init.txt: move description section upNguyễn Thái Ngọc Duy, Mar 19, 2011
  2. 2/2 init, clone: support --separate-git-dir for .git fileNguyễn Thái Ngọc Duy, Mar 19, 2011
  3. Matthieu MoyMar 19, 2011
  4. Nguyen Thai Ngoc DuyMar 19, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.