title: Ignore all dir's but one
body: <p>I'm trying to ignore all directories within a directory except one. Here is my file hierarchy.</p>
  
  <pre><code>project
    .gitignore
    main.rb
    libs
      foo
        foo.rb
      bar
        bar.rb
      com
        com.rb
  </code></pre>
  
  <p>I want to ignore all directories in libs except com
  Here is what i tried in .gitignore</p>
  
  <pre><code>/libs/ 
  !/libs/com/
  </code></pre>
  
  <p>When I do <code>git status</code> libs dir is not listed</p>
  
  <p>What I'm doing wrong?</p>