Re: Forcing git to pack objects
- From
- Mikael 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