git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: RPS <jim@resplendentwebservices.com>
Cc: git@vger.kernel.org
Subject: Re: Wildcards with git rm
Date: Mon, 30 Oct 2017 09:58:03 +0900	[thread overview]
Message-ID: <xmqqk1zd8nac.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <cbb7340e-aa8c-1980-41eb-95cd965d4037@resplendentwebservices.com> (RPS's message of "Sat, 28 Oct 2017 07:38:44 -0400")

RPS <jim@resplendentwebservices.com> writes:

> git rm doesn't seem to be very useful without the use of shell
> wildcards, especially with the use of a .gitignore file. If a
> .gitignore file is used, the git rm command does not consider the
> .gitignore file, and errs out when an ignored file is present.

Do you mean

	$ git rm COPY*

would complain about COPYING~ on your filesystem, which would match
the pattern "*~" you have in your .gitignore file, after editing the
tracked COPYING file?

If so, you may choose to tell your shell _not_ to expand wildcards,
as it does not know what is ignored, by doing

	$ git rm COPY\*

instead.  That would allow "git rm" to expand wildcards _with_ the
knowledge of what is and is not ignored.  The shell does not know
(probably you could teach if you wanted to, but it does not want to
know) and care about .gitignore files when it does its wildcard
expansion.

      reply	other threads:[~2017-10-30  0:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-28 11:38 Wildcards with git rm RPS
2017-10-30  0:58 ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqk1zd8nac.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jim@resplendentwebservices.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).