title: .gitignore is not ignoring a directory
body: <p>I've below directory structure in my project</p>
  <pre><code>my-module/src/main/resources/&lt;my-dir-to-be-ignore&gt; 
  </code></pre>
  <p>And I've added .gitignore file as my-module/.gitignore and here is the content of the .gitignore file.</p>
  <pre><code>**/src/main/resources/&lt;my-dir-to-be-ignore&gt;/
  </code></pre>
  <p>This didn't work and tried to use the below step</p>
  <p><a href="https://digitizor.com/gitignore-not-ignoring-files-how-to-fix/" rel="nofollow noreferrer">https://digitizor.com/gitignore-not-ignoring-files-how-to-fix/</a></p>
  <p>But when i tried to run the command &quot;<code>git rm -r --cached .</code>&quot;, I'm getting below error</p>
  <pre><code>fatal: pathspec '.' did not match any files
  </code></pre>