Skip to content

Instantly share code, notes, and snippets.

@nasoym
nasoym / git_folders.sh
Last active April 5, 2016 13:06
Operation on several git folders
#!/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