replace reference to git-rm with git-reset in git-commit doc
The message in git-commit suggesting to use 'git rm --cached' to unstage is just plain wrong. It really should mention 'git reset'. Suggested by Jan Hudec. Signed-off-by: Jing Xue <jingxue@digizenstudio.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Jing Xue committed
Nov 11, 2007 at 23:43 UTC
97e9a2216f33d1b6cff312f9535b6cf0d0ba4f16
2 files changed
+8
-4
Documentation/git-add.txt
+1
@@ -224,6 +224,7 @@ See Also
224
--------
225
gitlink:git-status[1]
226
gitlink:git-rm[1]
227
+gitlink:git-reset[1]
228
gitlink:git-mv[1]
229
gitlink:git-commit[1]
230
gitlink:git-update-index[1]
Documentation/git-commit.txt
+7
-4
@@ -154,10 +154,13 @@ EXAMPLES
154
--------
155
When recording your own work, the contents of modified files in
156
your working tree are temporarily stored to a staging area
157
-called the "index" with gitlink:git-add[1]. Removal
158
-of a file is staged with gitlink:git-rm[1]. After building the
159
-state to be committed incrementally with these commands, `git
160
-commit` (without any pathname parameter) is used to record what
157
+called the "index" with gitlink:git-add[1]. A file can be
158
+reverted back, only in the index but not in the working tree,
159
+to that of the last commit with `git-reset HEAD -- <file>`,
160
+which effectively reverts `git-add` and prevents the changes to
161
+this file from participating in the next commit. After building
162
+the state to be committed incrementally with these commands,
163
+`git commit` (without any pathname parameter) is used to record what
164
has been staged so far. This is the most basic form of the
165
command. An example:
166