summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c05ef93)
raw | patch | inline | side by side (parent: c05ef93)
author | Jing Xue <jingxue@digizenstudio.com> | |
Mon, 12 Nov 2007 04:43:00 +0000 (23:43 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 14 Nov 2007 09:58:03 +0000 (01:58 -0800) |
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>
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>
Documentation/git-add.txt | patch | blob | history | |
Documentation/git-commit.txt | patch | blob | history |
index 2fe73555559d5a31a7122c9e5ebb039db9428dbc..fd82fc19b5decb04a3aa4dfb7e15edf270f61d72 100644 (file)
--------
gitlink:git-status[1]
gitlink:git-rm[1]
+gitlink:git-reset[1]
gitlink:git-mv[1]
gitlink:git-commit[1]
gitlink:git-update-index[1]
index e54fb12103d4e4955f41532566cb4558432a97bb..d4bfd49ce12ebe8f7b172d6f682d64ccbce66087 100644 (file)
--------
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: