Skip to content

Instantly share code, notes, and snippets.

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