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

git clean -Xdf doesn't clean ignored files in subfolders

From
DBDavid Besen <dbesen@gmail.com>
Date
Nov 2, 2020, 22:44 UTC
Message-ID
<CAHqVHwt1QJjXCAbDD5ViZ1E_rD8u+H_XeJ=FOv4VFPTS8y3xjg@mail.gmail.com>
Hi!
I'm seeing some unexpected behavior with git clean:

git init test cd test echo "ignored.txt" > .gitignore mkdir folder touch folder/ignored.txt git clean -Xdf

I'd expect this to delete folder/ignored.txt, and instead it doesn't. I'm in git 2.29.2 on osx.

I saw that git clean -xdn does delete the file, so if this is a bug it's limited to -X.

Thanks! Dave

Next: Elijah Newren
Message 1 of 4 in “git clean -Xdf doesn't clean ignored files in subfolders”
  1. David BesenNov 2, 2020
  2. Elijah NewrenNov 3, 2020
  3. David BesenNov 3, 2020
  4. Elijah NewrenNov 3, 2020

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.