This is my favourite feature of gitignores.
Everytime I need "drafts", sample code, etc, in a repo, I create a folder in that repo, but then I have to remember to not add it to commits, and I don't want to add it to the .gitignore that is versioned, so I do "mkdir drafts && echo '*' > ./drafts/.gitignore", and it ignores my drafts without having to add a new ignored dir in the versioned .gitignores.
And obviously, it also "ignores" the .gitignore itself because it matches "*", while still taking it into account, which is what I need.
And obviously, it also "ignores" the .gitignore itself because it matches "*", while still taking it into account, which is what I need.