Created
October 12, 2015 05:08
-
-
Save vbjay/6ffb946594567f3d9fdf to your computer and use it in GitHub Desktop.
gc and update all git repos located in current folder and subfolders.
This file contains hidden or 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 | |
function procgit { | |
git count-objects -vH; | |
echo | |
git fetch --all | |
echo | |
git gc | |
git count-objects -vH | |
echo | |
} | |
export -f procgit | |
find "$(pwd)" -name .git -type d | while read d; do | |
cd "$d/.." | |
echo "$d" | |
procsubmod | |
git submodule foreach --recursive procgit | |
cd "$OLDPWD" | |
echo | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment