Created
February 15, 2017 13:03
-
-
Save nickgrealy/3ad1d08a5efc4696a29c658f1842d89a to your computer and use it in GitHub Desktop.
A git command for working with multiple 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/sh | |
# | |
# N.B. doesn't work for interactive scripts like "git diff" (instead use "git diff --exit-code"). | |
# | |
# Perform git operation on all git directories... | |
/usr/bin/find . -name .git -prune -execdir bash -c "echo -e '\033[0;35m---------\033[0m'" \; -execdir pwd \; -execdir git "$@" \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment