Re: git-rm isn't the inverse action of git-add
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 3, 2007, 06:26 UTC
- Message-ID
- <7vsl86roin.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <20070703051254.GA6477@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> On Mon, Jul 02, 2007 at 10:09:35PM -0700, Junio C Hamano wrote: > >> Exactly. And not considering that lossage helps us keep our >> sanity. I think "git rm --cached" falls into the same >> category. If the user wants to discard what is in the index >> without losing a copy in the working tree, I think we should let >> him do without fuss. > > OK. So should we _remove_ the safety valve in all cases where we're just > losing stuff that's in the index? It is, after all, recoverable. Should > there be a warning (I suspect it would get annoying very quickly)?
I personally do not think we would need any safety check for "git rm --cached", as it does not touch the working tree. For non-cached case I think the current behaviour is fine.
But I should warn you that I rarely use "git rm" myself.