Re: [RFC] git rm -u
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2013, 06:54 UTC
- Message-ID
- <7vzjys28a0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <50FB1673.8020808@gmail.com>
Eric James Michael Ritz <lobbyjones@gmail.com> writes:
Show 12 quoted lines
> On 01/19/2013 04:49 PM, Antoine Pelisse wrote: >> I think `git add -u` would be closer. It would stage removal of >> files, but would not stage untracked files. It would stage other >> type of changes though. > > On Sat, Jan 19, 2013 at 10:47 PM, Tomas Carnecky >> Does `git add -A` do what you want? > > Thank you Tomas and Antoine. Both of these commands do what I want: > stage deleted files on the index. But does the idea of a `git rm -u` > still sound useful since these commands also stage changes besides > deleted files?
Even though I am not sure how often I would use it myself, "reflect only the removals in the working tree to the index, but exclude any other kind of changes" might turn out to be a useful addition to the toolchest in certain cases.
I however am not yet convinced that "git rm -u" is a good way to express the feature at the UI. "git add -u" is "update the index with modification and removal but ignore new files because we won't know if they are garbage or assets". What the same "-u" option means in the context of "git rm" is not very clear, at least to me.