title: git error- did not match any file(s) known to git?
body: <p>I have added a pattern to ignore files recursively in exclude file inside .info in .git directory.</p>
  
  <pre><code>patter : httpdocs/**/bak_*.*
  </code></pre>
  
  <p>If I commit from httpdocs it is working and from the changed directory it gives error.</p>
  
  <pre><code>git commit -m "formatting js" httpdocs/* [working]
  
  git commit -m "formatting js" httpdocs/dir1/dir2/* [giving below error]
  </code></pre>
  
  <p><strong>error:</strong> pathspec 'httpdocs/dir1/dir2/bak_admin.abc.php' did not match any file(s) known to git.</p>
  
  <p>Basically I want to know why this is happening.</p>