0

I am trying to run git gc but I keep getting errors of too many open files.

warning: unable to access '.gitattributes': Too many open files
error: unable to open object pack directory: .git/objects/pack: Too many open files
fatal: failed to read object <hash>: Too many open files
error: failed to run repack

I don't know how to find what files are open and or how to close them.

I am using git version 2.13.0.windows.1 and Visual Studio code.

Len
  • 141
  • 1
  • 10
  • 1
    Try reboot. `lsof` can find all open handlers in linux but it doesn't work in windows. – ElpieKay Feb 20 '18 at 14:14
  • Tried a reboot but no dice. – Len Feb 20 '18 at 14:16
  • 1
    google for 'windows too many open files' – Michał Walenciak Feb 20 '18 at 14:53
  • Thanks for the suggestions. I have have solved the problem with a work around. Removed the repo and cloned a remote. Thankfully everything seems fine. Should I still leave the question up in-case someone has a real answer? – Len Feb 20 '18 at 15:40
  • 1
    @Len I've just posted an answer about about this topic at https://stackoverflow.com/a/66315779/5072722. You may lower the `gc.auto` threshold in `.gitconfig` to prevent this problem from happening again. – Arnie97 Feb 22 '21 at 12:52

0 Answers0