title: Best practice for using multiple .gitignore files
body: <p>There exists a collection of useful <code>.gitignore</code> files at
  <a href="https://github.com/github/gitignore" rel="noreferrer">https://github.com/github/gitignore</a>. Every ignores file there has an extension <code>.gitignore</code>, e.g. Java.gitignore, vim.gitignore. When I put these files directly into a workdir, they don't work.</p>
  
  <p>Is it necessary to create a single file <code>.gitignore</code> and merge the constituent files into it?</p>
  
  <p>Accordingly, when using a <code>--global</code> <code>.gitignore</code> file, it seems the config points to a single file. If for instance I want to apply all <code>.gitignore</code> files in a Global/ directory, should I manually merge them into a single file? If so, it's extra work to keep this merged file up to date with the "official" collection.</p>
  
  <p>To reiterate, I acknowledge that we can use different <code>.gitignore</code> files in different directories, but it is not what I want. I want to apply multiple <code>.gitignore</code> files in a single directory.</p>