git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] git-checkout.txt: fix incorrect statement about HEAD and index

From
Matthieu Moy <matthieu.moy@imag.fr>
Date
Apr 6, 2009, 20:45 UTC
Message-ID
<1239050722-1227-1-git-send-email-Matthieu.Moy@imag.fr>

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>
---
 Documentation/git-checkout.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt
index 1a6c19e..0b5485b 100644
--- a/Documentation/git-checkout.txt
+++ b/Documentation/git-checkout.txt
@@ -191,7 +191,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.
-- 
1.6.2.1.427.g061ea
Next: Matthieu Moy
Message 1 of 6 in “git-checkout.txt: fix incorrect statement about HEAD and index”
  1. 1/2 git-checkout.txt: fix incorrect statement about HEAD and indexMatthieu Moy, Apr 6, 2009
  2. 2/2 git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 6, 2009
  3. Mike RalphsonApr 7, 2009
  4. 1/2 git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 7, 2009
  5. git-checkout.txt: clarify that <branch> applies when no path is given.Matthieu Moy, Apr 7, 2009
  6. Junio C HamanoApr 7, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.