1

I had not enough disk space and wished to shrink my local git repo with a command

git repack -a -d --depth=250 --window=250

I had repo size of 6G and free space of 8G.

During execution of this command disk space was depleted and command failed. Now I have zero free space i.e. situation turned worse. How to repair it without re-cloning repo?

Dims
  • 47,675
  • 117
  • 331
  • 600
  • Show the output of `git count-objects -v`. It helps to see what takes up the space. – j6t Jan 31 '22 at 06:59
  • all of git's database is stored within the directory `.git` at the root of your local repository. You can start by checking the size of that directory and copy it to another medium (another disk, a USB stick, a distant server ...) with enough space, and run your maintainance operations on that copy. Also : make a backup copy. – LeGEC Jan 31 '22 at 09:04

0 Answers0