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

does "git clean" deliberately ignore "core.excludesFile"?

From
Robert P. J. Day <rpjday@crashcourse.ca>
Date
Feb 23, 2019, 15:11 UTC
Message-ID
<alpine.LFD.2.21.1902231008530.28936@localhost.localdomain>
  not sure why i never noticed this before, but the "-x" option for
"git clean" reads:
 -x
     Don’t use the standard ignore rules read from .gitignore
     (per directory) and $GIT_DIR/info/exclude, but do still use
     the ignore rules given with -e options. This allows
     removing all untracked files, including build products.
     This can be used (possibly in conjunction with git reset)
     to create a pristine working directory to test a clean
     build.
  but i see no mention of whether the file specified by
core.excludesFile is taken into account, and perusing the source code
doesn't seem to show that command checking that config option.
  am i misreading something? and if not, is there a reason git clean
does not consult core.excludesFile?
rday
-- 
========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                  http://crashcourse.ca/dokuwiki

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================
Next: Junio C Hamano
Message 1 of 7 in “does "git clean" deliberately ignore "core.excludesFile"?”
  1. Robert P. J. DayFeb 23, 2019
  2. Junio C HamanoFeb 23, 2019
  3. Johannes SchindelinFeb 23, 2019
  4. Johannes SchindelinFeb 23, 2019
  5. Robert P. J. DayFeb 23, 2019
  6. Junio C HamanoFeb 24, 2019
  7. Johannes SchindelinFeb 24, 2019

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.