Skip to content

Commit

Permalink
git-checkout.txt: fix incorrect statement about HEAD and index
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Matthieu Moy authored and Junio C Hamano committed Apr 8, 2009
1 parent 4f6a32f commit ce8936c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/git-checkout.txt
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,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.
Expand Down

0 comments on commit ce8936c

Please sign in to comment.