{"thread":{"id":"36442","subject":"How to recursively clean only those untracked files that are not ignored?","startedAt":"2014-04-19T09:05:52Z","lastAt":"2014-04-19T09:05:52Z","messageCount":1,"participants":["Ilya Basin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"239107","messageId":"925417488.20140419130552@gmail.com","threadId":"36442","inReplyTo":null,"subject":"How to recursively clean only those untracked files that are not ignored?","fromName":"Ilya Basin","fromEmail":"basinilya@gmail.com","sentAt":"2014-04-19T09:05:52Z","receivedAt":"2014-04-19T09:05:52Z","isPatch":false,"sender":{"key":"basinilya@gmail.com","avatar":null},"body":"According to the help, without -x option git clean should let alone the ignored files, but it doesn't.\n\n    [il@reallin test]$ cat .gitignore\n    *.sar\n    [il@reallin test]$ mkdir -p conf/sar && touch conf/sar/aaa.sar\n    [il@reallin test]$ git status\n    # On branch master\n    nothing to commit, working directory clean\n    [il@reallin test]$ git clean -df\n    Removing conf/\n\nconf/sar/aaa.sar is removed.\n\nI already asked this http://stackoverflow.com/questions/23148736/git-clean-removes-ignored-files-by-default\n\nSomeone even replied that \"git does exactly what documentation says\".\nWell, maybe, but I have doubts that the combination '-df' (without\n'-x') is useful at all. If someone wanted to delete ignored files, he\nwould use '-x' or '-X'.\n"}]}