title: Garbage collect commits in git
body: <p>I have some commits created by <code>git subtree</code> that I want to have garbage collect (more that any practical purpose just to understand what and why can get collected).</p>
  
  <p>I have already checked that these commits are not referenced the following ways:</p>
  
  <pre><code># In any reflog
  &gt; git reflog --all --no-abbrev-commit | grep &lt;hash&gt;
  (no output)
  
  # In any branch, local or remote
  &gt; git branch --contains &lt;hash&gt;
  (no output)
  &gt; git branch -r --contains &lt;hash&gt;
  (no output)
  
  # In any tag
  &gt; git tag --contains &lt;hash&gt;
  (no output)
  
  # In the current index
  &gt; git rev-list HEAD | grep &lt;hash&gt;
  (no output)
  
  # In references from filter-branch
  &gt; ls .git/refs/original/
  (the folder does not exist)
  </code></pre>
  
  <p>These are the place that <a href="http://www.kernel.org/pub/software/scm/git/docs/git-gc.html" rel="noreferrer">git gc documentation</a> lists that could contain references.</p>
  
  <p>Still the given commits still exist after <code>git gc</code>.</p>
  
  <p>Am I missing something? Or is there any git plumbing command that checks all this references?</p>