aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-commit.txt
diff options
context:
space:
mode:
authorJing Xue <jingxue@digizenstudio.com>2007-11-11 23:43:00 -0500
committerJunio C Hamano <gitster@pobox.com>2007-11-14 01:58:03 -0800
commit97e9a2216f33d1b6cff312f9535b6cf0d0ba4f16 (patch)
tree41b3441b91ed78ba272fdcf89b529bc779bb53a9 /Documentation/git-commit.txt
parentc05ef93879696638406cad5be54be577a2666d04 (diff)
downloadgit-97e9a2216f33d1b6cff312f9535b6cf0d0ba4f16.tar.gz
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>
Diffstat (limited to 'Documentation/git-commit.txt')
-rw-r--r--Documentation/git-commit.txt11
1 files changed, 7 insertions, 4 deletions
diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt
index e54fb12103..d4bfd49ce1 100644
--- a/Documentation/git-commit.txt
+++ b/Documentation/git-commit.txt
@@ -154,10 +154,13 @@ EXAMPLES
--------
When recording your own work, the contents of modified files in
your working tree are temporarily stored to a staging area
-called the "index" with gitlink:git-add[1]. Removal
-of a file is staged with gitlink:git-rm[1]. After building the
-state to be committed incrementally with these commands, `git
-commit` (without any pathname parameter) is used to record what
+called the "index" with gitlink:git-add[1]. A file can be
+reverted back, only in the index but not in the working tree,
+to that of the last commit with `git-reset HEAD -- <file>`,
+which effectively reverts `git-add` and prevents the changes to
+this file from participating in the next commit. After building
+the state to be committed incrementally with these commands,
+`git commit` (without any pathname parameter) is used to record what
has been staged so far. This is the most basic form of the
command. An example: