title: .gitignore ignoring files which are excluded from the ignore list
body: <p>I'm doing a Java project using Eclipse with the in build git-functionality. I have an <code>Images</code> folder in the same directory as the <code>.gitignore</code> file.
  I want to ignore all files in <code>Images</code> except <code>Destroyed-icon.png</code> <code>Layer_dot.png</code> <code>Not-enough-repair-packs-icon.png</code>.<br />
  According to <a href="https://stackoverflow.com/questions/1279533/is-there-a-way-to-tell-git-to-only-include-certain-files-instead-of-ignoring-cer">Is there a way to tell git to only include certain files instead of ignoring certain files?</a> I should be able to use the following in my <code>.gitignore</code> file, but is doesn't work. The whole <code>Images</code> directory is ignored.</p>
  <pre><code>Images
  !Images/Destroyed-icon.png
  !Images/Layer_dot.png
  !Images/Not-enough-repair-packs-icon.png
  </code></pre>
  <p>I already tried adding/removing all <code>/</code> before and after <code>Images</code>, restarting eclipse, closing and reopening the project but none of that worked.<br />
  There is nothing to Pull as well, my local repository is up to date.</p>