X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=Documentation%2Fgit-reset.txt;h=645f0c17485d35e6696be950fc61f5fdcf3dd14e;hb=7b1cb5c40ebb57c5a26f1335807be24dba8d4518;hp=1e9ae0ae9fe4d2fc9e36c4904c6e6f39c2f37639;hpb=7349df1142a8dba579c015b51805cc290fcb4e6e;p=git.git diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt index 1e9ae0ae9..645f0c174 100644 --- a/Documentation/git-reset.txt +++ b/Documentation/git-reset.txt @@ -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.