title: How to git ignore subfolders / subdirectories?
body: <p>I have a lot of projects in my <strong>.Net</strong> solution. I would like to exclude all &quot;bin/Debug&quot; and &quot;bin/Release&quot; folders (and their contents), but still include the &quot;bin&quot; folder itself and any dll's contained therein.</p>
  <p><code>.gitignore</code> with &quot;bin/&quot; ignores &quot;<strong>Debug</strong>&quot; and &quot;<strong>Release</strong>&quot; folders, but also any dll's contained in the &quot;bin&quot; folder.</p>
  <p><code>bin/Debug</code> or <code>bin/Release</code> in the <code>.gitignore</code> file does not exclude the directories unless I fully qualify the ignore pattern as <code>Solution/Project/bin/Debug</code> - which I don't want to do as I will need to include this full pattern for each project in my solution, as well as add it for any new projects added.</p>
  <p>Any suggestions?</p>