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

[PATCH] doc: git-reset: clarify the --keep usage example

From
Štěpán Němec <stepnem@gmail.com>
Date
Jun 14, 2017, 09:35 UTC
Message-ID
<1497432955-28525-1-git-send-email-stepnem@gmail.com>

The example doesn't work as provided (you get an error) when the 'edit' and 'commit' steps affect the same files. Add a note and reference the DISCUSSION to that effect.

Signed-off-by: Štěpán Němec <stepnem@gmail.com>
---
 Documentation/git-reset.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index 70f3753..727ba46 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -290,7 +290,8 @@ $ git reset --keep start                    <3>
     to branch2 (i.e. "git checkout -b branch2 start"), but nobody is
     perfect.
 <3> But you can use "reset --keep" to remove the unwanted commit after
-    you switched to "branch2".
+    you switched to "branch2" (as long as the commit doesn't conflict with your
+    working tree changes, see the "DISCUSSION" below for more details).
 
 Split a commit apart into a sequence of commits::
 +
-- 
2.1.4
Message 1 of 1 in “doc: git-reset: clarify the --keep usage example”
  1. doc: git-reset: clarify the --keep usage exampleŠtěpán Němec, Jun 14, 2017

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.