{"thread":{"id":"48757","subject":"BUG: sub-git files getting cleaned when using --exclude in the top git","startedAt":"2018-06-22T01:09:52Z","lastAt":"2018-06-22T01:09:52Z","messageCount":1,"participants":["Jehan Bing"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"350701","messageId":"006b01d409c5$b7898f80$269cae80$@codeaurora.org","threadId":"48757","inReplyTo":null,"subject":"BUG: sub-git files getting cleaned when using --exclude in the top git","fromName":"Jehan Bing","fromEmail":"jbing@codeaurora.org","sentAt":"2018-06-22T01:09:48Z","receivedAt":"2018-06-22T01:09:52Z","isPatch":false,"sender":{"key":"jbing@codeaurora.org","avatar":null},"body":"Hi,\n\nI have a setup with tree of 250+ git repositories. Every now and then, I\nwant to clean everything except for files generated by my IDE. So for all\nthe git repos, I run git clean -dfx --exclude <ide file>. What happens\nthen is, if a sub-git as that file, all its files are deleted (except for\nthat ide file) instead of being skipped.\n\nHere is a simplified setup:\n       git init a\n       cd a\n       git init b\n       touch b/1 b/2\n\nNow, if I run (from a):\n       git clean -dfx\ngit says Skipping repository b/ and nothing is cleaned, as expected.\n\nBut if I run:\n       git clean -dfx -e 1\nthen there is no skipping message and b/2 is deleted even if it is a file\ntracked by b.\nI would expect b to still be skipped and left untouched.\n\n\nRegards,\n  Jehan\n\n\n\n"}]}