title: gitignore all except file in sub-sub folder
body: <p>I already tried many combinations of the .gitignore but none worked for what I need. I have this tree:</p>
  
  <pre><code>jobs/
  jobs/projecta/config.xml
  jobs/projecta/garbage
  jobs/projecta/more/garbage
  jobs/projectb/config.xml
  jobs/projectb/garbage
  jobs/projectb/more/garbage
  </code></pre>
  
  <p>Garbage means any other file. I want to commit only the config.xml files, and ignore everything inside jobs/ except them. So I tried:</p>
  
  <pre><code>/jobs/*
  !/jobs/*/config.xml
  </code></pre>
  
  <p>This way, everything inside jobs are ignored, including the config.xml file. With the inverse order, same happens. So, I can force add all config files and changes to them will be tracked, but if I add a new folder inside jobs, it's config.xml won't appear as a untracked file, so this way people can forgot to add them.</p>
  
  <p>I already tried with **, but I got the same.</p>
  
  <p>Any ideas?
  Thanks!</p>