On Sun, Nov 11, 2007 at 03:05:18PM +0100, Jan Hudec wrote: > > The message in git-commit suggesting to use 'git rm --cached' to unstage is > just plain wrong. It really should mention 'git reset'. Hopefully this makes it clearer. I have also updated the faq in wiki to clarify. Signed-off-by: Jing Xue <jingxue@xxxxxxxxxxxxxxxxx> --- Documentation/git-add.txt | 1 + Documentation/git-commit.txt | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Documentation/git-add.txt b/Documentation/git-add.txt index 963e1ab..63829d9 100644 --- a/Documentation/git-add.txt +++ b/Documentation/git-add.txt @@ -224,6 +224,7 @@ See Also -------- 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] diff --git a/Documentation/git-commit.txt b/Documentation/git-commit.txt index e54fb12..7c63dd8 100644 --- a/Documentation/git-commit.txt +++ b/Documentation/git-commit.txt @@ -154,12 +154,12 @@ 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 -has been staged so far. This is the most basic form of the -command. An example: +called the "index" with gitlink:git-add[1]. File changes +previously staged can be removed with `git-reset +HEAD -- <file>`. 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: ------------ $ edit hello.c - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html