1

By going through the below git documentation, I learned how to maintain, cleanup, compress and save space for a git repository. But the problem I am facing is, having a large number of git repositories, say around ( 500 ) of them, Its not easy to visit each repository and do these clean up things, is there an automated way to visit each repository and clean up or compress each repository ?

a shell script or something like that ?

https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery

Kenshin
  • 1,030
  • 2
  • 12
  • 41

1 Answers1

1

a shell script or something like that ?

There is nothing in Git itself for managing multiple repos, so yes, you would need to script the process you are currently doing for one repo.

See for instances the approaches taken in:

Once you can find all your repos, you can apply the same set of commands you are currently using for one repo to compress and optimize said repo.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250