X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-clone.txt;h=86eb4c93682aa3d92fe001ae871913fc0dec8607;hb=v1.7.4.1-296-gb57fb80;hp=7ccd742a87db1541184868b794fa4ef597d04de8;hpb=ec82874ad47627a44b6b22a6645551a214293711;p=git.git diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 7ccd742a8..86eb4c936 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -12,7 +12,9 @@ SYNOPSIS 'git clone' [--template=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [--mirror] [-o ] [-b ] [-u ] [--reference ] - [--depth ] [--recursive] [--] [] + [--separate-git-dir|-L ] + [--depth ] [--recursive|--recurse-submodules] [--] + [] 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 :: -o :: @@ -143,8 +157,7 @@ objects from the source repository into a pack in the cloned repository. --template=:: 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 :: 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=:: +--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 @@ -181,7 +204,7 @@ include::urls.txt[] Examples -------- -Clone from upstream:: +* Clone from upstream: + ------------ $ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 @@ -190,7 +213,7 @@ $ make ------------ -Make a local clone that borrows from the current directory, without checking things out:: +* Make a local clone that borrows from the current directory, without checking things out: + ------------ $ git clone -l -s -n . ../copy @@ -199,7 +222,7 @@ $ git show-branch ------------ -Clone from upstream while borrowing from an existing local directory:: +* Clone from upstream while borrowing from an existing local directory: + ------------ $ git clone --reference my2.6 \ @@ -209,31 +232,20 @@ $ cd my2.7 ------------ -Create a bare repository to publish your changes to the public:: +* Create a bare repository to publish your changes to the public: + ------------ $ git clone --bare -l /home/proj/.git /pub/scm/proj.git ------------ -Create a repository on the kernel.org machine that borrows from Linus:: +* Create a repository on the kernel.org machine that borrows from Linus: + ------------ $ git clone --bare -l -s /pub/scm/.../torvalds/linux-2.6.git \ /pub/scm/.../me/subsys-2.6.git ------------ - -Author ------- -Written by Linus Torvalds - - -Documentation --------------- -Documentation by Junio C Hamano and the git-list . - - GIT --- Part of the linkgit:git[1] suite