From: Junio C Hamano Date: Mon, 12 Nov 2007 02:27:57 GMT Subject: Re: [PATCH] replace reference to git-rm with git-reset in git-commit doc Message-ID: <7vsl3c8afm.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20071112003845.GA7595@fawkes> Jing Xue writes: > 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. > > 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]. File changes > +previously staged can be removed with `git-reset > +HEAD -- `. I think "changes ... can be removed" risks to give a confused mental model that somehow git tracks changes. "A file can be reverted back to that of the last commit with ..." would be less risky.