Merge branch 'jm/stash-doc-k-for-keep'
[gitweb.git] / Documentation / git-clone.txt
index 5c16e317f66f326fac0dd0e5d70e26152aee66d3..0363d0039b274093e6d230a83fcf99c3ff6700d8 100644 (file)
@@ -14,7 +14,7 @@ SYNOPSIS
          [-o <name>] [-b <name>] [-u <upload-pack>] [--reference <repository>]
          [--separate-git-dir <git dir>]
          [--depth <depth>] [--[no-]single-branch]
-         [--recursive|--recurse-submodules] [--] <repository>
+         [--recursive | --recurse-submodules] [--] <repository>
          [<directory>]
 
 DESCRIPTION
@@ -55,15 +55,12 @@ repository is specified as a URL, then this flag is ignored (and we
 never use the local optimizations).  Specifying `--no-local` will
 override the default when `/path/to/repo` is given, using the regular
 Git transport instead.
-+
-To force copying instead of hardlinking (which may be desirable if you
-are trying to make a back-up of your repository), but still avoid the
-usual "Git aware" transport mechanism, `--no-hardlinks` can be used.
 
 --no-hardlinks::
-       Optimize the cloning process from a repository on a
-       local filesystem by copying files under `.git/objects`
-       directory.
+       Force the cloning process from a repository on a local
+       filesystem to copy the files under the `.git/objects`
+       directory instead of using hardlinks. This may be desirable
+       if you are trying to make a back-up of your repository.
 
 --shared::
 -s::
@@ -181,14 +178,9 @@ objects from the source repository into a pack in the cloned repository.
 
 --depth <depth>::
        Create a 'shallow' clone with a history truncated to the
-       specified number of revisions.  A shallow repository has a
-       number of limitations (you cannot clone or fetch from
-       it, nor push from nor into it), but is adequate if you
-       are only interested in the recent history of a large project
-       with a long history, and would want to send in fixes
-       as patches.
-
---single-branch::
+       specified number of revisions.
+
+--[no-]single-branch::
        Clone only the history leading to the tip of a single branch,
        either specified by the `--branch` option or the primary
        branch remote's `HEAD` points at. When creating a shallow
@@ -213,7 +205,7 @@ objects from the source repository into a pack in the cloned repository.
 --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.
+       then make a filesystem-agnostic Git symbolic link to there.
        The result is Git repository can be separated from working
        tree.
 
@@ -239,8 +231,8 @@ Examples
 * Clone from upstream:
 +
 ------------
-$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6
-$ cd my2.6
+$ git clone git://git.kernel.org/pub/scm/.../linux.git my-linux
+$ cd my-linux
 $ make
 ------------
 
@@ -257,10 +249,10 @@ $ git show-branch
 * Clone from upstream while borrowing from an existing local directory:
 +
 ------------
-$ git clone --reference my2.6 \
-       git://git.kernel.org/pub/scm/.../linux-2.7 \
-       my2.7
-$ cd my2.7
+$ git clone --reference /git/linux.git \
+       git://git.kernel.org/pub/scm/.../linux.git \
+       my-linux
+$ cd my-linux
 ------------
 
 
@@ -271,13 +263,6 @@ $ git clone --bare -l /home/proj/.git /pub/scm/proj.git
 ------------
 
 
-* 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
-------------
-
 GIT
 ---
 Part of the linkgit:git[1] suite