Can you have additional .gitignore per directory within a single repo?

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.


Similar question was: Are multiple `.gitignore`s frowned on? (Jul 2010)

Or if you can have different version of a .gitignore file per branch: Using github to host public git repositories whilst ensuring that sensitive data files remain untracked (Feb 2010)

Further perhaps related: How do I tell git to always select my local version for conflicted merges on a specific file?