X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=Documentation%2Fgit-clone.txt;h=790b87b231d46d6e9de9d85024b25b49ee225488;hb=1be0659efca4a1f69c851f95563e930d70d8baf2;hp=83f58ae5365f05297a432cbd147c496e9fff8ba1;hpb=8fc66df237afce0b4318657f166b3583831949f3;p=git.git diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 83f58ae5..790b87b2 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -8,7 +8,9 @@ git-clone - Clones a repository. SYNOPSIS -------- -'git-clone' [-l [-s]] [-q] [-n] [-u ] [] +[verse] +'git-clone' [-l [-s]] [-q] [-n] [-o ] [-u ] + [] DESCRIPTION ----------- @@ -56,6 +58,13 @@ OPTIONS -n:: No checkout of HEAD is performed after the clone is complete. +-o :: + Instead of using the branch name 'origin' to keep track + of the upstream repository, use instead. Note + that the shorthand name stored in `remotes/origin` is + not affected, but the local branch name to pull the + remote `master` branch into is. + --upload-pack :: -u :: When given, and the repository to clone from is handled @@ -74,10 +83,31 @@ OPTIONS for "host.xz:foo/.git"). Cloning into an existing directory is not allowed. +Examples +~~~~~~~~ + +Clone from upstream:: ++ +------------ +$ git clone git://git.kernel.org/pub/scm/.../linux-2.6 my2.6 +$ cd my2.6 +$ make +------------ + + +Make a local clone that borrows from the current directory, without checking things out:: ++ +------------ +$ git clone -l -s -n . ../copy +$ cd copy +$ git show-branch +------------ + Author ------ Written by Linus Torvalds + Documentation -------------- Documentation by Junio C Hamano and the git-list .