Search code examples
gittortoisegit

Loose Objects and TortoiseGit v Git


I use TortoiseGit for my repositories but sometimes I right-click and select Git GUI Here. Why does it sometimes show this:

Loose Objects

I let it compress the database. But TortoiseGit is not mentioning anything about this.

Unlike similar questions I am asking why Git GUI raises a message about loose objects and Tortoise Git does not. Thus it is not exactly the same as the nominated duplicate question.


Solution

  • "Loose objects" mean objects that are individual files on the filesystem rather than in more efficient packfiles. "Compress the database" probably means it'll run git gc. See also this answer to What are the “loose objects” that the Git GUI refers to?

    These days Git will, from time to time, clean them up for you by running garbage collection, git gc. There's no need to prompt the user. This feels like Git GUI has a hold over from years ago when Git did not do its own garbage collection. My understanding is 2880 is a fairly low number of loose objects.

    Check that you haven't inadvertently set gc.auto to 0 with git config gc.auto.