diff options
Diffstat (limited to 'Documentation/git-clone.txt')
-rw-r--r-- | Documentation/git-clone.txt | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index a0727d7759..85769b884e 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -182,11 +182,13 @@ 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. + number of limitations (you cannot clone or fetch from it, nor + push into it), but is adequate if you are only interested in + the recent history of a large project with a long history. ++ +Pushing from a shallow clone should be avoided if the git version on +the receiver end is older than v1.7.10, or any other git +implementation that does not perform connectivity check. --[no-]single-branch:: Clone only the history leading to the tip of a single branch, @@ -239,8 +241,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 +259,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 +273,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 |