title: Issue with ignoring subdirectory in git
body: <p>I have a maven multi-modules project which has a depth of around 5 levels.<br>
  I'm now moving to git and I see that a lot of the content of the <code>target</code> folder is captured by git as "Unstaged Changes".<br>
  I've googled a lot and searched SO but couldn't find an answer as to how to get git to ignore the <strong>entire</strong> directory tree of the <code>target</code> folder.<br>
  My <code>.gitignore</code>, which resides at the root of the project, looks like this:  </p>
  
  <pre><code>.project  
  .classpath
  .settings/
  target/
  </code></pre>
  
  <p>The strange thing is that the <code>.class</code> files, which reside somewhere under the <code>target</code> tree, do get ignored by the above definitions but files like <code>MANIFEST.MF</code>, <code>pom.properties</code> or my own application properties files which are located somewhere in the <code>target</code> directory tree are not ignored.<br>
  I've read <a href="https://stackoverflow.com/questions/991801/git-ignores-and-maven-targets">Git Ignores and Maven targets</a> but that solution does not seem to work for me.<br>
  I can also say that when I try to add <code>target/*</code> rule it doesn't change anything and when I replace <code>target/</code> with the <code>target/*</code> then the <code>.class</code> files appear as unstaged as well.<br>
  I'd really appreciate some guidance as it seems very unlikely to me that the hordes of people using git and maven haven't already resolved similar issues. Thanks.</p>