Re: "git rm" seems to do recursive removal even without "-r"

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

 



[My SMTP server still refuses to accept emails to rpjday@xxxxxxxxxxxxxx
 and reports "mailbox unavailable" and "invalid DNS MX or A/AAAA resource
 record."  So just replying to the list.]

Am 08.10.2017 um 13:56 schrieb Robert P. J. Day:
>    but as i asked in my earlier post, if i wanted to remove *all* files
> with names of "Makefile*", why can't i use:
> 
>    $ git rm 'Makefile*'
> 
> just as i used:
> 
>    $ git rm '*.c'
> 
> are those not both acceptable fileglobs? why does the former clearly
> only match the top-level Makefile, and refuse to cross directory
> boundaries?
> 
>    $ git rm -n 'Makefile*'
>    rm 'Makefile'
>    $

Try:

	$ git rm -n '*Makefile'

The whole path is considered.  The asterisk there matches any
directory part -- but also any file name prefix.  Check the entry for
"pathspec" in gitglossary(7) for more details.

René



[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