title: Cant add target folder to .gitignore
body: <p>I have Spring module project on <em>Bitbucket</em> with 2 Spring Boot apps in it. In the root module I have the <em>.gitignore</em> file and in every app I have <em>.gitignore</em> file with this content :</p>
  
  <pre><code>config.properties
  .classpath
  .project
  .settings/
  .idea/
  target/
  *.iml
  </code></pre>
  
  <p>I tried pulling project again but no changes.
  Config.properties do get ignored but target folder isn't. Every time I make some change, I get target folder file in my git changes list.</p>
  
  <p><a href="https://i.stack.imgur.com/VSRox.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VSRox.png" alt="target folder files in git"></a></p>