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::
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:
--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.