title: Ignore all files and files in subdirectories except one file
body: <p>Imagine the following structure:</p>
  
  <pre><code>/a/1.txt
  /a/2.txt
  /a/.keep
  
  /a/b/1.txt
  /a/b/2.txt
  /a/b/3.txt
  /a/b/.keep
  
  /a/b/c/1.txt
  /a/b/c/2.txt
  /a/b/c/3.txt
  /a/b/c/4.txt
  /a/b/c/.keep
  
  /d/test.txt
  /d/work.txt
  </code></pre>
  
  <p>I want to ignore all files in <code>a</code> directory except <strong><code>.keep</code></strong> files to obtain the following results:</p>
  
  <pre><code>/a/.keep
  
  /a/b/.keep
  
  /a/b/c/.keep
  
  /d/test.txt
  /d/work.txt
  </code></pre>
  
  <p>My <code>.gitignore</code> file that doesn't work:</p>
  
  <pre><code>/a/*
  !.keep
  </code></pre>