Last active
August 26, 2019 14:53
-
-
Save RichardFevrier/4242571c919a6e79b6ba40bbcd14faf5 to your computer and use it in GitHub Desktop.
Git LFS cleaner
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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