git-checkout.txt: fix incorrect statement about HEAD and index
The command "git checkout" checks out from the index by default, not HEAD (the introducing comment were correct, but the detailled explanation added below were not). Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
4f6a32f8af
commit
ce8936c342
@ -145,8 +145,8 @@ $ git checkout hello.c <3>
|
|||||||
------------
|
------------
|
||||||
+
|
+
|
||||||
<1> switch branch
|
<1> switch branch
|
||||||
<2> take out a file out of other commit
|
<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
|
If you have an unfortunate branch that is named `hello.c`, this
|
||||||
step would be confused as an instruction to switch to that branch.
|
step would be confused as an instruction to switch to that branch.
|
||||||
|
Loading…
Reference in New Issue
Block a user