Skip to content

Commit 8b32572

Browse files
jonasJunio C Hamano
authored andcommitted
git-init-db(1): Describe --shared and the idempotent nature of init-db
Based on the recent discussion on the mailing list. Signed-off-by: Jonas Fonseca <fonseca@diku.dk> Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 4e7a2ec commit 8b32572

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

Documentation/git-init-db.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@ git-init-db - Creates an empty git repository
88

99
SYNOPSIS
1010
--------
11-
'git-init-db' [--template=<template_directory>]
11+
'git-init-db' [--template=<template_directory>] [--shared]
1212

1313

1414
OPTIONS
1515
-------
1616
--template=<template_directory>::
1717
Provide the directory in from which templates will be used.
1818

19+
--shared::
20+
Specify that the git repository is to be shared amongst several users.
21+
1922

2023
DESCRIPTION
2124
-----------
@@ -30,7 +33,16 @@ If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY`
3033
environment variable then the sha1 directories are created underneath -
3134
otherwise the default `$GIT_DIR/objects` directory is used.
3235

33-
`git-init-db` won't hurt an existing repository.
36+
A shared repository allows users belonging to the same group to push into that
37+
repository. When specifying `--shared` the config variable "core.sharedRepository"
38+
is set to 'true' so that directories under `$GIT_DIR` are made group writable
39+
(and g+sx, since the git group may be not the primary group of all users).
40+
41+
42+
Running `git-init-db` in an existing repository is safe. It will not overwrite
43+
things that are already there. The primary reason for rerunning `git-init-db`
44+
is to pick up newly added templates.
45+
3446

3547

3648
EXAMPLES

0 commit comments

Comments
 (0)