From: Avery Pennarun Date: Wed, 16 Jul 2008 18:17:33 GMT Subject: Re: [PATCH,RFC] Implement 'git rm --if-missing' Message-ID: <32541b130807161117h54e97825o9119655f73138341@mail.gmail.com> In-Reply-To: <20080716180617.GO32184@machine.or.cz> On 7/16/08, Petr Baudis wrote: > On Wed, Jul 16, 2008 at 07:00:50PM +0100, Ciaran McCreesh wrote: > > git rm --if-missing will only remove files if they've already been removed from > > disk. > > > > Signed-off-by: Ciaran McCreesh > > what is the usage scenario? The porcelain options space is a precious > resource, so please explain why do you need this and who is going to use > it (especially with such a long name). I see the idea here: right now you can do: touch a b c git add . And have it auto-add all the new files, so "git commit" will work. But there is no equivalent for rm, because for obvious reasons, rm b c git rm . Doesn't do the same thing. And "git add ." doesn't auto-recognize deletions, which probably also makes sense. "git commit -a", on the other hand, will automatically commit all deletions for you. But you don't always want to commit *all* your changes just because you want to commit all your deletions. That said, --if-missing is a bit unwieldy. I don't have a better suggestion though. Have fun, Avery