git-reset.txt: Small fix + clarifications.
This basically translates the man-page from 'git-developerish' to plain english, adding some almost-sample output from git-status so users can recognize what will happen. Also mention explicitly that --mixed updates the index, while --soft doesn't. I understood the old text to mean "--mixed is exactly like --soft, but verbose". Signed-off-by: Andreas Ericsson <ae@op5.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Andreas Ericsson committed
Nov 20, 2005 at 22:42 UTC
936a23420c8e1630e013578ba9285cd69cf918f7
1 file changed
+15
-4
Documentation/git-reset.txt
+15
-4
@@ -14,19 +14,30 @@ DESCRIPTION
14
Sets the current head to the specified commit and optionally resets the
15
index and working tree to match.
16
17
+This command is useful if you notice some small error in a recent
18
+commit (or set of commits) and want to redo that part without showing
19
+the undo in the history.
20
+
21
+If you want to undo a commit other than the latest on a branch,
22
+gitlink:git-revert[1] is your friend.
23
+
24
OPTIONS
25
-------
26
--mixed::
20
- Like --soft but reports what has not been updated. This is the
21
- default action.
27
+ Resets the index but not the working tree (ie, the changed files
28
+ are preserved but not marked for commit) and reports what has not
29
+ been updated. This is the default action.
30
31
--soft::
32
Does not touch the index file nor the working tree at all, but
25
- requires them in a good order.
33
+ requires them to be in a good order. This leaves all your changed
34
+ files "Updated but not checked in", as gitlink:git-status[1] would
35
+ put it.
36
37
--hard::
38
Matches the working tree and index to that of the tree being
29
- switched to.
39
+ switched to. Any changes to tracked files in the working tree
40
+ since <commit-ish> are lost.
41
42
<commit-ish>::
43
Commit to make the current HEAD.