X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-init.txt;h=71749c09d309f4cae2da9788969359d2620224a9;hb=aebd173ffa7a4e67447f0157a14abde7767c54e9;hp=62914da97b5b8335a2c2597606f046dfb2295e03;hpb=67cdec1e58f1f9bc17d500b04e856042e0b2bf59;p=git.git diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 62914da97..71749c09d 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -8,7 +8,7 @@ git-init - Create an empty git repository or reinitialize an existing one SYNOPSIS -------- -'git-init' [-q | --quiet] [--template=] [--shared[=]] +'git init' [-q | --quiet] [--bare] [--template=] [--shared[=]] OPTIONS @@ -16,10 +16,16 @@ OPTIONS -- --q, \--quiet:: +-q:: +--quiet:: Only print error and warning messages, all other output will be suppressed. +--bare:: + +Create a bare repository. If GIT_DIR environment is not set, it is set to the +current working directory. + --template=:: Provide the directory from which templates will be used. The default template @@ -31,7 +37,7 @@ structure, some suggested "exclude patterns", and copies of non-executing "hook" files. The suggested patterns and hook files are all modifiable and extensible. ---shared[={false|true|umask|group|all|world|everybody}]:: +--shared[={false|true|umask|group|all|world|everybody|0xxx}]:: Specify that the git repository is to be shared amongst several users. This allows users belonging to the same group to push into that @@ -52,6 +58,12 @@ is given: - 'all' (or 'world' or 'everybody'): Same as 'group', but make the repository readable by all users. + - '0xxx': '0xxx' is an octal number and each file will have mode '0xxx' + Any option except 'umask' can be set using this option. '0xxx' will + override users umask(2) value, and thus, users with a safe umask (0077) + can use this option. '0640' will create a repository which is group-readable + but not writable. '0660' is equivalent to 'group'. + By default, the configuration flag receive.denyNonFastForwards is enabled in shared repositories, so that you cannot force a non fast-forwarding push into it. @@ -74,11 +86,11 @@ 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` +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 +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 @@ -93,8 +105,8 @@ Start a new git repository for an existing code base:: + ---------------- $ cd /path/to/my/codebase -$ git-init <1> -$ git-add . <2> +$ git init <1> +$ git add . <2> ---------------- + <1> prepare /path/to/my/codebase/.git directory @@ -111,4 +123,4 @@ Documentation by David Greaves, Junio C Hamano and the git-list