Last active
April 5, 2016 13:06
-
-
Save nasoym/1a4f091177c513c6cd4f62b5dc44e666 to your computer and use it in GitHub Desktop.
Operation on several git folders
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 . -maxdepth 2 -type d -path "*/.git" \ | |
| parallel -k "\ | |
echo -e '\033[0;35m$(printf "=%.s" {1..10}) {//}\033[0m'; \ | |
git --git-dir={} --work-tree={//} $@ \ | |
" | |
#usage examples: | |
# git_folders.sh log -since='"1 day ago"' --oneline | |
# git_folders.sh status --short | |
# git_folders.sh pull |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment