From b57fb80a7d7d19102b31ab94a28ed43ea1ee07bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sat, 19 Mar 2011 22:16:56 +0700 Subject: init, clone: support --separate-git-dir for .git file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --separate-git-dir tells git to create git dir at the specified location, instead of where it is supposed to be. A .git file that points to that location will be put in place so that it appears normal to repo discovery process. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 10 ++++++++++ Documentation/git-init.txt | 17 +++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 857748007..86eb4c936 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -12,6 +12,7 @@ SYNOPSIS 'git clone' [--template=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o ] [-b ] [-u ] [--reference ] + [--separate-git-dir|-L ] [--depth ] [--recursive|--recurse-submodules] [--] [] @@ -176,6 +177,15 @@ objects from the source repository into a pack in the cloned repository. repository does not have a worktree/checkout (i.e. if any of `--no-checkout`/`-n`, `--bare`, or `--mirror` is given) +-L=:: +--separate-git-dir=:: + Instead of placing the cloned repository where it is supposed + to be, place the cloned repository at the specified directory, + then make a filesytem-agnostic git symbolic link to there. + The result is git repository can be separated from working + tree. + + :: The (possibly remote) repository to clone from. See the <> section below for more information on specifying diff --git a/Documentation/git-init.txt b/Documentation/git-init.txt index 0a4a20e18..58cd01145 100644 --- a/Documentation/git-init.txt +++ b/Documentation/git-init.txt @@ -8,7 +8,9 @@ git-init - Create an empty git repository or reinitialize an existing one SYNOPSIS -------- -'git init' [-q | --quiet] [--bare] [--template=] [--shared[=]] [directory] +'git init' [-q | --quiet] [--bare] [--template=] + [--separate-git-dir|-L ] + [--shared[=]] [directory] DESCRIPTION @@ -29,7 +31,8 @@ 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. +rerunning 'git init' is to pick up newly added templates (or to move +the repository to another place if --separate-git-dir is given). OPTIONS ------- @@ -51,6 +54,16 @@ current working directory. Specify the directory from which templates will be used. (See the "TEMPLATE DIRECTORY" section below.) +-L=:: +--separate-git-dir=:: + +Instead of initializing the repository where it is supposed to be, +place a filesytem-agnostic git symbolic link there, pointing to the +specified git path, and initialize a git repository at the path. The +result is git repository can be separated from working tree. If this +is reinitialization, the repository will be moved to the specified +path. + --shared[=(false|true|umask|group|all|world|everybody|0xxx)]:: Specify that the git repository is to be shared amongst several users. This -- cgit v1.2.1