aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-04-13 07:21:04 -0400
committerJunio C Hamano <gitster@pobox.com>2009-04-13 09:08:16 -0700
commit0808723b5065cc2141c2715a2df78882c158d4ef (patch)
tree541ec3396b570560d4a37a8fb55aa57954b6cf14 /Documentation/git-checkout.txt
parent76cfadfc17e9e9c7da87a6f9a4710c04107ae0cd (diff)
downloadgit-0808723b5065cc2141c2715a2df78882c158d4ef.tar.gz
docs/checkout: clarify what "non-branch" means
In the code we literally stick "refs/heads/" on the front and see if it resolves, so that is probably the best explanation. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt10
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 4a1fb53096..ad4b31e892 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -114,11 +114,11 @@ the conflicted merge in the specified paths.
"merge" style, shows the original contents).
<branch>::
- Branch to checkout (when no paths are given); may be any object
- ID that resolves to a commit. Defaults to HEAD.
-+
-When this parameter names a non-branch (but still a valid commit object),
-your HEAD becomes 'detached'.
+ Branch to checkout; if it refers to a branch (i.e., a name that,
+ when prepended with "refs/heads/", is a valid ref), then that
+ branch is checked out. Otherwise, if it refers to a valid
+ commit, your HEAD becomes "detached" and you are no longer on
+ any branch (see below for details).
+
As a special case, the `"@\{-N\}"` syntax for the N-th last branch
checks out the branch (instead of detaching). You may also specify