Code

Merge branch 'wp/doc-filter-direction'
[git.git] / Documentation / git-reset.txt
index 1e9ae0ae9fe4d2fc9e36c4904c6e6f39c2f37639..645f0c17485d35e6696be950fc61f5fdcf3dd14e 100644 (file)
@@ -53,9 +53,12 @@ OPTIONS
        and the current commit in the working tree.
 
 --keep::
-       Resets the index to match the tree recorded by the named commit,
-       but keep changes in the working tree. Aborts if the reset would
-       change files that are already modified in the working tree.
+       Reset the index to the given commit, keeping local changes in
+       the working tree since the current commit, while updating
+       working tree files without local changes to what appears in
+       the given commit.  If a file that is different between the
+       current commit and the given commit has local changes, reset
+       is aborted.
 
 -p::
 --patch::
@@ -155,7 +158,8 @@ tree. If there could be conflicts between the changes in the commit we
 want to remove and the changes in the working tree we want to keep,
 the reset is disallowed. That's why it is disallowed if there are both
 changes between the working tree and HEAD, and between HEAD and the
-target.
+target. To be safe, it is also disallowed when there are unmerged
+entries.
 
 The following tables show what happens when there are unmerged
 entries:
@@ -174,7 +178,7 @@ entries:
                                --mixed  X       A     A
                                --hard   A       A     A
                                --merge  A       A     A
-                               --keep   X       A     A
+                               --keep  (disallowed)
 
 X means any state and U means an unmerged index.