summaryrefslogtreecommitdiff
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-08 05:51:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-04-08 05:51:14 (GMT)
commitaa41cf8f43687579363a2360795cac621d5254ed (patch)
treecf46e92578852a6a36eaf359a517831fcf6379bb /Documentation/git-checkout.txt
parentacb0b7b01f64cf55d508b469eb2a351359c0cd82 (diff)
parent20ff3ec28e1dc7b653bfdc7643cb55045d7913fc (diff)
downloadgit-aa41cf8f43687579363a2360795cac621d5254ed.zip
git-aa41cf8f43687579363a2360795cac621d5254ed.tar.gz
git-aa41cf8f43687579363a2360795cac621d5254ed.tar.bz2
Merge branch 'maint-1.6.0' into maint-1.6.1
* maint-1.6.0: Documentation: clarify .gitattributes search git-checkout.txt: clarify that <branch> applies when no path is given. git-checkout.txt: fix incorrect statement about HEAD and index
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 9cd5151..5ece6cc 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -127,9 +127,13 @@ the conflicted merge in the specified paths.
<new_branch>::
Name for the new branch.
+<tree-ish>::
+ Tree to checkout from (when paths are given). If not specified,
+ the index will be used.
+
<branch>::
- Branch to checkout; may be any object ID that resolves to a
- commit. Defaults to HEAD.
+ 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'.
@@ -187,8 +191,8 @@ $ git checkout hello.c <3>
------------
+
<1> switch branch
-<2> take out a file out of other commit
-<3> restore hello.c from HEAD of current branch
+<2> take a file out of another commit
+<3> restore hello.c from the index
+
If you have an unfortunate branch that is named `hello.c`, this
step would be confused as an instruction to switch to that branch.