Skip to content

Instantly share code, notes, and snippets.

@doekman
Created December 19, 2016 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doekman/c43b0ca06f93da6897f1f39ff3156771 to your computer and use it in GitHub Desktop.
Save doekman/c43b0ca06f93da6897f1f39ff3156771 to your computer and use it in GitHub Desktop.
Update all git repositories in direct subdirectories
#!/usr/bin/env bash
find . -maxdepth 1 -mindepth 1 -type d | while read i; do (cd "$i"; if [[ -d ".git" ]]; then echo "Checking $i" && git pull; fi; cd ..); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment