Re: [Feature request] Add -u option to git rm to delete untracked files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 26, 2020 at 11:21:23PM +0200, Erik Janssen wrote:

> Would it be feasible to add a -u option to git rm to specify that I
> also want a file deleted if it is not tracked by git?

It might be a little tricky, as I suspect the code is starting from the
set of tracked files, and then applying the arguments of pathspecs (but
I didn't look too carefully, so I might be wrong).

The "git clean" command is made for this (and starts by iterating over
the filesystem), and does exactly what you want. But I guess you are
hoping for a state where you can just run "git rm" without having to
think about whether the file is tracked or not.

-Peff



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux