Re: "git rm" could be safer and have a better help msg

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

 



At 16:04 +0200 10 Jul 2020, Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:
On Jul 10 2020, Tom Browder wrote:

If the existing file has been modified, with 'rm'  the '--cached'
option doesn't remove it from Git
unless one uses the '-f' option with it.

It doesn't?  Worksforme.

It needs to be forced iff the cached version doesn't match either what's in HEAD or on the file system. So when there's potential to lose work similar to other situations which require specifying a force option.

    $ git rm --cached a
    error: the following file has staged content different from both the
    file and the HEAD:
        a
    (use -f to force removal)



[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