git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: git-gc doesn't clean up leftover objects after git-filter-branch unless you clone first

From
Avery Pennarun <apenwarr@gmail.com>
Date
Apr 24, 2008, 15:43 UTC
Message-ID
<32541b130804240843k471ecfeteb1008c44a56808b@mail.gmail.com>
In-Reply-To
<20080424012836.GA30812@sigill.intra.peff.net>
On 4/23/08, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
>  +
>  +Notes
>  +-----
>  +
>  +git-gc tries very hard to be safe about the garbage it collects. In
>  +particular, it will keep not only objects referenced by your current set
>  +of branches and tags, but also objects referenced by the index, remote
>  +tracking branches, refs saved by linkgit:git-filter-branch[1] in
>  +refs/original/, or reflogs (which may references commits in branches
>  +that were later amended or rewound).
>  +
>  +If you are expecting some objects to be collected and it isn't, check
>  +all of those locations and decide whether it makes sense in your case to
>  +remove those references.
>  +

This information would have helped me quite a bit when I first encountered this problem. It would be nice if it also showed up under git-prune (since git-gc doesn't delete anything itself, if I understand correctly). Also a link to some information about reflogs (even just to "see also" git-reflog) would help, since I didn't hear about reflogs at all until after I joined the mailing list.

Avery
Previous: Jeff KingNext: Jeff King
Message 6 of 12 in “git-gc doesn't clean up leftover objects after git-filter-branch unless you clone first”
  1. Avery PennarunApr 23, 2008
  2. Junio C HamanoApr 23, 2008
  3. Avery PennarunApr 23, 2008
  4. Jeff KingApr 23, 2008
  5. Jeff KingApr 24, 2008
  6. Avery PennarunApr 24, 2008
  7. Jeff KingApr 24, 2008
  8. Avery PennarunApr 24, 2008
  9. Documentation: point git-prune users to git-gcJeff King, Apr 29, 2008
  10. Junio C HamanoApr 29, 2008
  11. Jeff KingApr 29, 2008
  12. Junio C HamanoApr 30, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.