title: .gitignore How to exclude all direct files of a specific folder but include all subfolders of that folder?
body: <p>I want to exclude all direct files of the folder <code>reports</code> but include all subfolders.
  At first I didn't knew that there were any subfolders in this folder and I pushed <code>reports/*</code>, to not push any automatically generated reports. 
  But now all the template files in the subfolders are marked as deleted in the staging area, and I want to fix this:</p>
  
  <p><strong>Exclude:</strong> </p>
  
  <ul>
  <li>reports/report1.pdf</li>
  <li>reports/report2.txt</li>
  <li>reports/report3PlainFile</li>
  <li>...</li>
  </ul>
  
  <p><strong>Include:</strong></p>
  
  <ul>
  <li>reports/A/a_1_template.rpt</li>
  <li>reports/A/a_2_template.rpt</li>
  <li>reports/B/a_2_template.rpt</li>
  <li>...</li>
  </ul>
  
  <p>I have tried:</p>
  
  <pre><code>    reports/*
      !reports/*/
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    reports/*
      !reports/*/*
  </code></pre>
  
  <p>but it doesn't seem to work.</p>
  
  <p>Now everyting in the <code>reports</code> folder is excluded. 
  But I want to only exclude all direct files and include all subfolders (and their contents).</p>