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

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

From
Elijah Newren <newren@gmail.com>
Date
Nov 3, 2020, 17:11 UTC
Message-ID
<CABPp-BEF2wqP+Cx5-6yq6cfQ1Pa+8iOXWR11DNBH02yh-D8oFg@mail.gmail.com>
In-Reply-To
<CAHqVHwt1QJjXCAbDD5ViZ1E_rD8u+H_XeJ=FOv4VFPTS8y3xjg@mail.gmail.com>
On Mon, Nov 2, 2020 at 2:46 PM David Besen <dbesen@gmail.com> wrote:
Show 17 quoted lines
>
> 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.

Is this the same issue as reported at https://lore.kernel.org/git/4F1384AE.1050209@pcharlan.com/?

Previous: David BesenNext: David Besen
Message 2 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.