Code

init, clone: support --separate-git-dir for .git file
[git.git] / Documentation / git-clone.txt
index b49de66764e97e4bb0725898f00dcba072329dc8..86eb4c93682aa3d92fe001ae871913fc0dec8607 100644 (file)
@@ -12,7 +12,9 @@ SYNOPSIS
 'git clone' [--template=<template_directory>]
          [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror]
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
-         [--depth <depth>] [--recursive] [--] <repository> [<directory>]
+         [--separate-git-dir|-L <git dir>]
+         [--depth <depth>] [--recursive|--recurse-submodules] [--] <repository>
+         [<directory>]
 
 DESCRIPTION
 -----------
@@ -29,7 +31,7 @@ arguments will in addition merge the remote master branch into the
 current master branch, if any.
 
 This default configuration is achieved by creating references to
-the remote branch heads under `$GIT_DIR/refs/remotes/origin` and
+the remote branch heads under `refs/remotes/origin` and
 by initializing `remote.origin.url` and `remote.origin.fetch`
 configuration variables.
 
@@ -96,13 +98,20 @@ objects from the source repository into a pack in the cloned repository.
 
 --quiet::
 -q::
-       Operate quietly.  This flag is also passed to the `rsync'
+       Operate quietly.  Progress is not reported to the standard
+       error stream. This flag is also passed to the `rsync'
        command when given.
 
 --verbose::
 -v::
-       Display the progress bar, even in case the standard output is not
-       a terminal.
+       Run verbosely. Does not affect the reporting of progress status
+       to the standard error stream.
+
+--progress::
+       Progress status is reported on the standard error stream
+       by default when it is attached to a terminal, unless -q
+       is specified. This flag forces progress status even if the
+       standard error stream is not directed to a terminal.
 
 --no-checkout::
 -n::
@@ -121,7 +130,12 @@ objects from the source repository into a pack in the cloned repository.
        configuration variables are created.
 
 --mirror::
-       Set up a mirror of the remote repository.  This implies `--bare`.
+       Set up a mirror of the source repository.  This implies `--bare`.
+       Compared to `--bare`, `--mirror` not only maps local branches of the
+       source to local branches of the target, it maps all refs (including
+       remote-tracking branches, notes etc.) and sets up a refspec configuration such
+       that all these refs are overwritten by a `git remote update` in the
+       target repository.
 
 --origin <name>::
 -o <name>::
@@ -143,8 +157,7 @@ objects from the source repository into a pack in the cloned repository.
 
 --template=<template_directory>::
        Specify the directory from which templates will be used;
-       if unset the templates are taken from the installation
-       defined default, typically `/usr/share/git-core/templates`.
+       (See the "TEMPLATE DIRECTORY" section of linkgit:git-init[1].)
 
 --depth <depth>::
        Create a 'shallow' clone with a history truncated to the
@@ -156,6 +169,7 @@ objects from the source repository into a pack in the cloned repository.
        as patches.
 
 --recursive::
+--recurse-submodules::
        After the clone is created, initialize all submodules within,
        using their default settings. This is equivalent to running
        `git submodule update --init --recursive` immediately after
@@ -163,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=<git dir>::
+--separate-git-dir=<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.
+
+
 <repository>::
        The (possibly remote) repository to clone from.  See the
        <<URLS,URLS>> section below for more information on specifying
@@ -223,17 +246,6 @@ $ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \
     /pub/scm/.../me/subsys-2.6.git
 ------------
 
-
-Author
-------
-Written by Linus Torvalds <torvalds@osdl.org>
-
-
-Documentation
---------------
-Documentation by Junio C Hamano and the git-list <git@vger.kernel.org>.
-
-
 GIT
 ---
 Part of the linkgit:git[1] suite