Skip to contentSkip to conversation

doc: git-reset: clarify the --keep usage example

PATCH New Štěpán Němec 1 participant 1 message Jun 14, 2017 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: git-reset: clarify the --keep usage example

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.

---
 Documentation/git-reset.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Documentation/git-reset.txt +2 -1
index 70f3753..727ba46 100644
@@ -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::
 +
Signature · 1 line
2.1.4