Re: [RFC] git rm -u
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:56:15
Eric James Michael Ritz [off-list ref] writes:
On 01/19/2013 04:49 PM, Antoine Pelisse wrote:quoted
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 Carneckyquoted
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.