title: Git ignore subfolders but not the files in a folder
body: <p>I've been looking around and just could not find the same scenario that I have. I have:</p>
  
  <pre><code>--public
        |--img
             |--logo (folder)
             |--post_image (folder)
             |--banner.jpg
             |--icon.ico
             |--image1.jpg
             |-........etc
  </code></pre>
  
  <p>I need to ignore the <code>logo</code> and <code>post_image</code> folders, but I want to keep every file that is inside <code>img</code> folder. How would I go about it?</p>
  
  <p>Right now I have <code>**/public/img</code> but I feel is not the right approach!</p>