title: Subfolders in .gitignore
body: <p>I have many subfolders in my repo, in which there are few <code>build/</code> directories I'd like to ignore when committing my code. As I understand it, there are two ways to ignore all of the folders:</p>
  
  <ul>
  <li><code>*/build/</code> (Unix wildcards)</li>
  <li><code>build/</code> (<em>git</em> way of ignoring files/folders)</li>
  </ul>
  
  <p>I've found <a href="https://stackoverflow.com/questions/2545602/git-ignore-sub-folders">Git ignore sub folders</a> but it has two answers and I would like to know <strong>what the difference (none?) between the two approaches is</strong>. Does the same rule apply to files?</p>