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

Re: Forcing git to pack objects

From
MMMikael Magnusson <mikachu@gmail.com>
Date
Dec 20, 2015, 02:25 UTC
Message-ID
<CAHYJk3Tzx29A+ZuOhXcxZThwZ98WmKC4aiwX32T=KA-7PTqs7g@mail.gmail.com>
In-Reply-To
<CAOc6etZePL=yvy=fVt9e=RmwdStJy6Kf621icYbYOER-NyMvXg@mail.gmail.com>

On Sat, Dec 19, 2015 at 2:03 AM, Edmundo Carmona Antoranz <eantoranz@gmail.com> wrote:

Show 20 quoted lines
> Hi!
>
> Recently I was running manually a git gc --prune command (wanted to
> shrink my 2.8G .git directory by getting rid of loose objects) and I
> ended up running out of space on my HD. After freaking out a little
> bit (didn't know if the repo would end up in a 'stable' state), I
> ended up freeing up some space and I again have a working repo...
> _but_ I noticed that basically _all_ objects on my repo are laying
> around in directories .git/objects/00 to ff (and taking a whole lot of
> space... like the .git directory is now like 5 GBs). After running git
> gc manually again it ended up taking a lot of time and the objects are
> still there. Also git svn sometimes gcs after fetching and it took to
> run cause of the gc execution (ended up killing it) and the files are
> still there. Is it possible to ask git to put all those objects in
> .pack files? Or did I mess something on my repo?
>
> Just in case, that's a repo I use at work that's working on a windows
> box (git for windows 2.6.3).
>
> Thanks in advance.
git repack -d should do it.
-- 
Mikael Magnusson
Previous: Edmundo Carmona AntoranzNext: Jeff King
Message 2 of 3 in “Forcing git to pack objects”
  1. Edmundo Carmona AntoranzDec 19, 2015
  2. Mikael MagnussonDec 20, 2015
  3. Jeff KingDec 20, 2015

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.