Last active
August 29, 2015 14:27
-
-
Save versedi/56cb2b7fb2c3fb6b9a88 to your computer and use it in GitHub Desktop.
Update multiple repositories in subdirectories
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 | |
find ~me/projects/ -type d -name .git \ | |
| xargs -n 1 dirname \ | |
| sort \ | |
| while read line; do echo $line && cd $line && git pull; done | |
#If above ain't working (cygwin had some problems with syntax) | |
find . -type d -name .git -exec sh -c "cd \"{}\"/../ && pwd && git pull && git status" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment