Skip to content

Commit ce8936c

Browse files
moygitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4f6a32f commit ce8936c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Documentation/git-checkout.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ $ git checkout hello.c <3>
145145
------------
146146
+
147147
<1> switch branch
148-
<2> take out a file out of other commit
149-
<3> restore hello.c from HEAD of current branch
148+
<2> take a file out of another commit
149+
<3> restore hello.c from the index
150150
+
151151
If you have an unfortunate branch that is named `hello.c`, this
152152
step would be confused as an instruction to switch to that branch.

0 commit comments

Comments
 (0)