Thread (8 messages) flat view 8 messages, 5 authors, 2016-06-15

Re: [RFC] git rm -u

From: Antoine Pelisse <hidden>
Date: 2016-06-15 22:56:15

I must say that I'm not very interested in the feature. In my opinion,
there are already many different ways to stage changes.
Assuming that the feature would be needed, I would keep it under the
scope of git-add, as it's the reference for staging. I would suggest
something like:

    git add -r   "Stage removal of deleted files."

On Mon, Feb 25, 2013 at 7:54 AM, Junio C Hamano [off-list ref] wrote:
Eric James Michael Ritz [off-list ref] writes:
quoted
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 Carnecky
quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help