Can you create a .gitignore file in a directory that only applies to files (and directories) within that directory?
Yes, you can. Try it, it works fine. Put a .gitignore
in the root of your repo, and put another .gitignore
with additional things to ignore in a subdirectory.