title: Gitignore doesn't work on .xml files and /target directory
body: <p>I have a two <code>.gitignore</code> files because one didn't work in the past and I had to create the second one; they which looks:</p>
  
  <pre><code>/target/
  .idea/
  </code></pre>
  
  <p>and <code>.gitignore.gitignore</code> which looks:</p>
  
  <pre><code>*/target/**
  /target/**
  !.mvn/wrapper/maven-wrapper.jar
  
  ### STS ###
  .apt_generated
  .classpath
  .factorypath
  .project
  .settings
  .springBeans
  target/
  
  ### IntelliJ IDEA ###
  .idea
  *.iws
  *.iml
  *.ipr
  .idea/
  
  ### NetBeans ###
  nbproject/private/
  build/
  nbbuild/
  dist/
  nbdist/
  .nb-gradle/
  </code></pre>
  
  <p>and still it includes those files which are in <code>.gitignore</code> - why?<a href="https://i.stack.imgur.com/LtOsg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LtOsg.png" alt="enter image description here"></a></p>