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

[PATCH 2/6] git-reset.txt: reset does not change files in target

From
Michael J Gruber <git@drmicha.warpmail.net>
Date
Sep 13, 2010, 08:06 UTC
Message-ID
<9669b7872536d2555d4b2c01560c552d97fdd81b.1284365021.git.git@drmicha.warpmail.net>
In-Reply-To
<cover.1284365021.git.git@drmicha.warpmail.net>

git-reset obviously cannot change files in an existing commit. Make it not sound as if it could: reset can change HEAD and, in that sense, can change which state a file in HEAD is in.

Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>
---
 Documentation/git-reset.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 7d68b4c..8fb871c 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -295,7 +295,7 @@ file. For example, the first line of the first table means that if a
 file is in state A in the working tree, in state B in the index, in
 state C in HEAD and in state D in the target, then "git reset --soft
 target" will put the file in state A in the working tree, in state B
-in the index and in state D in HEAD.
+in the index and set HEAD to target (which has the file in state D).
 
       working index HEAD target         working index HEAD
       ----------------------------------------------------
-- 
1.7.3.rc1.215.g6997c
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 22 in “git-reset.txt improvements”
  1. 0/6 git-reset.txt improvementsMichael J Gruber, Sep 13, 2010
  2. 1/6 git-reset.txt: clarify branch vs. branch headMichael J Gruber, Sep 13, 2010
  3. Junio C HamanoSep 14, 2010
  4. 2/6 git-reset.txt: reset does not change files in targetMichael J Gruber, Sep 13, 2010
  5. Junio C HamanoSep 14, 2010
  6. 3/6 git-reset.txt: reset --soft is not a no-opMichael J Gruber, Sep 13, 2010
  7. Jay SoffianSep 13, 2010
  8. Junio C HamanoSep 13, 2010
  9. 4/6 git-reset.txt: use "working tree" consistentlyMichael J Gruber, Sep 13, 2010
  10. 5/6 git-reset.txt: point to git-checkoutMichael J Gruber, Sep 13, 2010
  11. Junio C HamanoSep 14, 2010
  12. 6/6 git-reset.txt: make modes description more consistentMichael J Gruber, Sep 13, 2010
  13. Junio C HamanoSep 14, 2010
  14. Michael J GruberSep 15, 2010
  15. Jay SoffianSep 13, 2010
  16. 0/6 git-reset.txt improvementsMichael J Gruber, Sep 15, 2010
  17. 1/6 git-reset.txt: clarify branch vs. branch headMichael J Gruber, Sep 15, 2010
  18. 2/6 git-reset.txt: reset does not change files in targetMichael J Gruber, Sep 15, 2010
  19. 3/6 git-reset.txt: reset --soft is not a no-opMichael J Gruber, Sep 15, 2010
  20. 4/6 git-reset.txt: use "working tree" consistentlyMichael J Gruber, Sep 15, 2010
  21. 5/6 git-reset.txt: point to git-checkoutMichael J Gruber, Sep 15, 2010
  22. 6/6 git-reset.txt: make modes description more consistentMichael J Gruber, Sep 15, 2010

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.