Created
February 28, 2017 10:40
-
-
Save stekycz/5571b2bd9beab253a2db281559aaae9e to your computer and use it in GitHub Desktop.
Runs GC and prune in all GIT repositories in given path except PHP composer vendor directories and node_modules
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
#!/bin/bash | |
root=$1 | |
current_dir=`pwd` | |
for file in `find $root -not -path "*vendor*" -not -path "*node_modules*" -name ".git"`; do cd $file/..; echo `pwd`:; echo; git gc; git prune; git gc; echo; done | |
cd $current_dir |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment