summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 76cfadf)
raw | patch | inline | side by side (parent: 76cfadf)
author | Jeff King <peff@peff.net> | |
Mon, 13 Apr 2009 11:21:04 +0000 (07:21 -0400) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 13 Apr 2009 16:08:16 +0000 (09:08 -0700) |
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>
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>
Documentation/git-checkout.txt | patch | blob | history |
index 4a1fb530961f589573916c0dfc2c3080da162d9c..ad4b31e89218e857001fce69f32acbe85fc7539c 100644 (file)
"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