summaryrefslogtreecommitdiff
path: root/Documentation/git-clone.txt
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-01-16 16:46:15 +0700
committerJunio C Hamano <gitster@pobox.com>2012-01-16 16:26:26 -0800
commit5a7d5b683f869d3e3884a89775241afa515da9e7 (patch)
treecf3930dd84c09d9bacdda4c993aab526e7bd493e /Documentation/git-clone.txt
parent920b691fe4da8115f9b79901411c0cc5fff17efe (diff)
downloadgit-5a7d5b683f869d3e3884a89775241afa515da9e7.tar.gz
clone: allow --branch to take a tag
Because a tag ref cannot be put to HEAD, HEAD will become detached. This is consistent with "git checkout <tag>". This is mostly useful in shallow clone, where it allows you to clone a tag in addtion to branches. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-clone.txt')
-rw-r--r--Documentation/git-clone.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 0931a3e392..6e22522c4f 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -147,8 +147,9 @@ objects from the source repository into a pack in the cloned repository.
-b <name>::
Instead of pointing the newly created HEAD to the branch pointed
to by the cloned repository's HEAD, point to `<name>` branch
- instead. In a non-bare repository, this is the branch that will
- be checked out.
+ instead. `--branch` can also take tags and treat them like
+ detached HEAD. In a non-bare repository, this is the branch
+ that will be checked out.
--upload-pack <upload-pack>::
-u <upload-pack>::