@matheusbsbs / matheus-bagliano / commits / 8b32572c74
Fork 0

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>

Jonas Fonseca committed Dec 31, 2005 at 18:30 UTC 8b32572c74172dfc1b3c86f2940deb8f384b1bc4
1 file changed +14 -2
Documentation/git-init-db.txt
+14 -2
@@ -8,7 +8,7 @@ git-init-db - Creates an empty git repository
8
9 SYNOPSIS
10 --------
11 -'git-init-db' [--template=<template_directory>]
11 +'git-init-db' [--template=<template_directory>] [--shared]
12
13
14 OPTIONS
@@ -16,6 +16,9 @@ OPTIONS
16 --template=<template_directory>::
17 Provide the directory in from which templates will be used.
18
19 +--shared::
20 + Specify that the git repository is to be shared amongst several users.
21 +
22
23 DESCRIPTION
24 -----------
@@ -30,7 +33,16 @@ If the object storage directory is specified via the `$GIT_OBJECT_DIRECTORY`
33 environment variable then the sha1 directories are created underneath -
34 otherwise the default `$GIT_DIR/objects` directory is used.
35
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 +
46
47
48 EXAMPLES