Created
June 18, 2022 22:24
-
-
Save zkxs/ac6e7a22af8ffd2889aa83610e16b527 to your computer and use it in GitHub Desktop.
Fetch all github repos I have cloned
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 | |
process() { | |
pushd . > /dev/null | |
cd "$(dirname "$1")" | |
echo "$PWD" | |
git fetch --all | |
popd > /dev/null | |
} | |
find . -maxdepth 3 -type d -name '.git' | while read file; do process "$file"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment