title: Untrack and stop tracking files in git
body: <p>I have a deep subfolder called <code>objects</code> with files called <code>*.object</code> which I don't want tracked by git (Windows).</p>
  
  <p>In .gitignore I have tried various combinations (e.g. <code>**/objects/*</code> or <code>**/objects/*</code> etc.) to no avail: each time, when I do <code>git status</code> I see:</p>
  
  <pre><code># Untracked files:
  #   (use "git add &lt;file&gt;..." to include in what will be committed)
  #
  #       foo/src/objects/a.object
  #       foo/src/objects/b.object
  </code></pre>
  
  <p>It is only when I add <code>*.object</code> to .gitignore that the files disappear from the untracked files list. What's wrong with my wild cards?</p>
  
  <p>Also, when is <code>git update-index</code> required and when should I do <code>git rm --cached myfile</code>?</p>
  
  <p>Is there a wildcard feature for rm like <code>git rm --cached **/foo/*.zip</code>?</p>
  
  <p>UPDATE: Similarly, adding the line <code>.gitignore</code> to <code>.gitignore</code> (not always desirable but still) has no effect. Is this weirdness because the files may have been tracked in the past?</p>