On 19/09/2018 05:59, Duy Nguyen wrote: > On Tue, Sep 18, 2018 at 6:13 AM Victor Engmark > <victorengmark@xxxxxxxxxxxxxxx> wrote: […] >> $ cat > .gitignore << EOF >>> * >>> !foo bar >>> !foo\ bar >>> !"foo bar" > > No need to quote, either with double quotes or backslashes. They are > interpreted as literal " and \ Thanks! I just tried a bunch of things to see if anything stuck. >> $ git status --short >> [no output] > > It's not exactly a bug, more like a trap. '*' matches anything, at > every level. So even if you negate 'foo bar', when we check 'foo > bar/test', '*' pattern applies again and ignores 'foo bar/test'. If > the first line in .gitignore is /* instead of * (to keep match > anything at the top level directory only), then it should work. You're right, I've managed to induce the placebo effect in myself :) Thank you for the help, and sorry for the noise! -- Cheers Victor