On Mon, 13 Jan 2014 13:11:13 +0100
Valerio Pachera <siri...@gmail.com> wrote:

> 'git rm' without option will remove the file from the working tree.
> I need the file to stay there.
> The option I need to remove the file only from the index by the option
> '--cached'.

Yes, that's exactly what you needed.
You should understand that the "--amend" command-line option to
`git commit` merely asks Git to *replace* the commit at HEAD with the
commit which will be created once `git commit --amend` will have

So, before running that command you're supposed to tweak the state of
the index in the usual way to prepare a commit you want to record (and
then replace with it the current tip commit).  You should get under
your skin that commits are always recorded from the state of the index
("the staging area" is the newer term for this), and
`git commit --amend` is not different from `git commit` in this regard
-- it doesn't start some sort of special mode for amending a commit;
it just records a new one based on the index.

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to