TIL: Including subfiles of ignored directories
Okay that title is a bit of a mess. Here’s the problem, you have a directory that looks like this:
Previously I didn’t want to upload anything in
scripts, however now I’ve added
build.js and I would like that uploaded.
.ignore looks like this right now:
I initially thought that just adding an exception for the file would work:
But nope! That doesn’t work. At first I thought it was to do with specificity, but reordering had no effect either.
It turns out, what I actually needed was:
This means I exclude everything inside the scripts directory, but it still allows me to explicitly include my