git gc –prune a on complet directory structure

To run “git gc –prune” on a structure of subdirectory of git repositories, like for example a /git directory on a server:


find /git -type d -execdir sh -c '[ -f "description" ] && sudo git gc --prune' \;