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

Cleaning ignored files

From
RTRoman Terekhov <roman.terekhov@gmail.com>
Date
Nov 9, 2016, 18:23 UTC
Message-ID
<CALbGNxUahc0b151niqS3Qd6N8wapY5RWJs1w0ZSf6ZW1=id6vA@mail.gmail.com>
Hi,
I want to ask about git clean -dXf command behaviour.
I do the following:

$ mkdir gitignore_test $ cd gitignore_test/ $ git init Initialized empty Git repository in ~/gitignore_test/.git/

$ echo *.sln > .gitignore
$ git add .gitignore
$ git commit -m "add gitignore"
[master (root-commit) ef78a3c] add gitignore
 1 file changed, 1 insertion(+)
 create mode 100644 .gitignore

$ mkdir src $ touch test.sln $ touch src/test.sln $ tree . ├── src │ └── test.sln └── test.sln

1 directory, 2 files

$ git clean -dXf Removing test.sln

$ tree
.
└── src
    └── test.sln
1 directory, 1 file
Why git clean -dXf does not remove all my test.sln files, but just one of them?
Roman Terekhov
Next: John Szakmeister
Message 1 of 2 in “Cleaning ignored files”
  1. Roman TerekhovNov 9, 2016
  2. John SzakmeisterNov 10, 2016

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.