2

There is one large directory, called docs, with a lot of nested directories, some of which have 2 more levels of directories inside them, that I want to get rid of entirely. Running java -jar ~/bfg-1.12.15.jar --delete-folders docs actually made the repo slightly larger, though it seemed to execute fine. It listed the dirty and modified commits, the changed objects, and logged a report.

Is the issue that it doesn't removed the nested directories, only the top level one? Can it remove things recursively?

kim holder
  • 1,744
  • 3
  • 16
  • 25

1 Answers1

3

Ah, the issue was I hadn't yet run the commands git reflog expire --expire=now --all && git gc --prune=now --aggressive, and so the size reduction was not yet visible. And by testing, it is clear it does remove nested folders, as trying to remove one that was part of a deleted parent folder showed nothing to delete and the program aborted.

As I've only done this a little and am new to it all, this sort of thing is easy to forget.

kim holder
  • 1,744
  • 3
  • 16
  • 25
  • I seem to have the same issue, as told here. I did run the commands that you had overlooked, but the changes no not appear reflected in earlier commits. Can you spot something evident that I did wrong? – emagar Mar 10 '18 at 15:34
  • 1
    @emagar Maybe the maintenance script one of our people wrote can help you. Find it here: https://github.com/briligg/moonwards/tree/master/maintenance – kim holder Mar 10 '18 at 15:42
  • @emagar You will need to download the files on that list, and then follow the instructions in the readme. – kim holder Mar 10 '18 at 15:43
  • Looks great @kim-holder! I'll explore and report. – emagar Mar 10 '18 at 18:34