title: Why ignore settings in .gitignore file in submodule
body: <p>In my project I use 3 .gitignore files:</p>
  
  <p>in myproject/.gitignore</p>
  
  <pre><code>*.iml
  .gradle
  .idea
  /local.properties
  /.idea/workspace.xml
  /.idea/libraries
  .DS_Store
  /build
  /captures
  /app/src/test
  /app/src/androidTest
  /app/src/debug/
  /app/src/release/
  /app/build
  </code></pre>
  
  <p>in <code>app/.gitignore</code>:</p>
  
  <p>/build</p>
  
  <p>and in <code>library/.gitignore</code>:</p>
  
  <pre><code>/build
  </code></pre>
  
  <p>But when I start Git client it's show me files in folder <code>library/build/</code></p>
  
  <p><a href="https://i.stack.imgur.com/HlTx8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HlTx8.png" alt="mo"></a></p>
  
  <p>why?</p>