Skip to content

Instantly share code, notes, and snippets.

@RichardFevrier
Last active August 26, 2019 14:52
Show Gist options
  • Save RichardFevrier/886bf8c32bec8f99d2e2c2722841761f to your computer and use it in GitHub Desktop.
Save RichardFevrier/886bf8c32bec8f99d2e2c2722841761f to your computer and use it in GitHub Desktop.
Git cleaner
#!/usr/bin/ruby
Dir.glob("**/*/") do |filepath|
if File.exist?("#{filepath}.git/")
`cd #{Dir.pwd}/#{filepath} && git gc`
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment