path: root/Documentation/git-reset.txt
diff options
authorJonathan Nieder <>2011-01-21 18:37:34 (GMT)
committerJunio C Hamano <>2011-01-21 20:41:14 (GMT)
commit8c0db6fd51cec5fd82cf4054818c0a1ca4a58f37 (patch)
treeb563f3ee12a439303b975a804f8dec9f2ff1c44a /Documentation/git-reset.txt
parent25f3af3f9d351a3d50cb9fc2bf7bddf941e4bc58 (diff)
Documentation: do not treat reset --keep as a special case
The current treatment of "git reset --keep" emphasizes how it differs from --hard (treatment of local changes) and how it breaks down into plumbing (git read-tree -m -u HEAD <commit> followed by git update-ref HEAD <commit>). This can discourage people from using it, since it might seem to be a complex or niche option. Better to emphasize what the --keep flag is intended for --- moving the index and worktree from one commit to another, like "git checkout" would --- so the reader can make a more informed decision about the appropriate situations in which to use it. Signed-off-by: Jonathan Nieder <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-reset.txt')
1 files changed, 2 insertions, 7 deletions
diff --git a/Documentation/git-reset.txt b/Documentation/git-reset.txt
index fd72976..927ecee 100644
--- a/Documentation/git-reset.txt
+++ b/Documentation/git-reset.txt
@@ -76,15 +76,10 @@ In other words, --merge does something like a 'git read-tree -u -m <commit>',
but carries forward unmerged index entries.
- Resets the index, updates files in the working tree that are
- different between <commit> and HEAD, but keeps those
- which are different between HEAD and the working tree (i.e.
- which have local changes).
+ Resets index entries and updates files in the working tree that are
+ different between <commit> and HEAD.
If a file that is different between <commit> and HEAD has local changes,
reset is aborted.
-In other words, --keep does a 2-way merge between <commit> and HEAD followed by
-'git reset --mixed <commit>'.
If you want to undo a commit other than the latest on a branch,