Skip to content

Instantly share code, notes, and snippets.

@fvdm
Created January 27, 2016 07:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save fvdm/599f5167d7a0fcbb3178 to your computer and use it in GitHub Desktop.
Save fvdm/599f5167d7a0fcbb3178 to your computer and use it in GitHub Desktop.
#!/bin/sh
export arg=$@
find . -name '.git' -type d -exec bash -c 'path=${1%/.git}; echo $path; cd "$path" && git gc $arg' 0 {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment