summaryrefslogtreecommitdiff
path: root/Documentation/git-checkout.txt
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-04-07 23:05:43 -0700
committerJunio C Hamano <gitster@pobox.com>2009-04-07 23:05:43 -0700
commit6da14ee14f85fe5766780e1cbe8d42d385638e9e (patch)
tree0841b44063c977d3968615306c9481e4b5467ab2 /Documentation/git-checkout.txt
parent9e36d1173584d67ca61a5b43016bcbfe77e15946 (diff)
parent747f9d30ed706ebd930ef888971fff5638334831 (diff)
downloadgit-6da14ee14f85fe5766780e1cbe8d42d385638e9e.tar.gz
Merge branch 'maint'
* maint: Change double quotes to single quotes in message 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 Conflicts: Documentation/git-checkout.txt
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r--Documentation/git-checkout.txt10
1 files changed, 7 insertions, 3 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 1a6c19e5c3..223ea9caef 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -126,9 +126,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'.
@@ -191,7 +195,7 @@ $ git checkout hello.c <3>
+
<1> switch branch
<2> take a file out of another commit
-<3> restore hello.c from HEAD of current branch
+<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.