git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: why no "ignore" command on git

From
Jeff King <peff@peff.net>
Date
Oct 15, 2009, 15:52 UTC
Message-ID
<20091015155220.GA12169@coredump.intra.peff.net>
In-Reply-To
<vpqaazsrj0q.fsf@bauges.imag.fr>
On Thu, Oct 15, 2009 at 01:31:01PM +0200, Matthieu Moy wrote:
Show 11 quoted lines
> >> why there is no "ignore" command on git?
> >
> > You could always make your own git-ignore script, e.g.:
> >
> > #!/bin/sh
> > echo "$@" >> .gitignore
> 
> Sure. OTOH, there are other interesting things a "ignore" command can
> do. bzr, for example, has a "bzr ignore" command that can either add
> stuff to your .bzrignore, or tell you which pattern cause which file
> to be ignored. That's handy sometimes.
I wrote a toy patch that did something like that a while ago:
  http://thread.gmane.org/gmane.comp.version-control.git/108671/focus=108842

I don't think there is any reason such a thing could not be included with git (if it did something more interesting than just echoing its arguments to .gitignore), but nobody has felt strongly enough about it yet to actually write something polished.

-Peff
Previous: Matthieu Moy
Message 6 of 6 in “why no "ignore" command on git”
  1. Ralf ThielowOct 14, 2009
  2. Scott WiersdorfOct 14, 2009
  3. Wesley J. LandakerOct 15, 2009
  4. Johannes SchindelinOct 15, 2009
  5. Matthieu MoyOct 15, 2009
  6. Jeff KingOct 15, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.