git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jing Xue <jingxue@digizenstudio.com>
To: git <git@vger.kernel.org>
Subject: [PATCH] replace reference to git-rm with git-reset in git-commit doc
Date: Sun, 11 Nov 2007 19:38:45 -0500	[thread overview]
Message-ID: <20071112003845.GA7595@fawkes> (raw)
In-Reply-To: <20071111140518.GA3847@efreet.light.src>

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@digizenstudio.com>
---
 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

  reply	other threads:[~2007-11-12  0:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-02  2:17 git rm --cached Jing Xue
2007-11-02 16:13 ` Remi Vanicat
2007-11-02 21:41   ` Jing Xue
2007-11-03  9:39     ` Remi Vanicat
2007-11-04 17:04     ` Matthieu Moy
2007-11-11 14:05 ` Jan Hudec
2007-11-12  0:38   ` Jing Xue [this message]
2007-11-12  2:27     ` [PATCH] replace reference to git-rm with git-reset in git-commit doc Junio C Hamano
2007-11-12  4:43       ` [PATCH] RESUBMIT: " Jing Xue
2007-11-14  8:56         ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071112003845.GA7595@fawkes \
    --to=jingxue@digizenstudio.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).