Last active
May 15, 2019 09:47
-
-
Save slode/9bcba0de231a5179959c87fefb3d1f83 to your computer and use it in GitHub Desktop.
zsh function for running a command in multiple git repositories
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
autoload -U colors && colors | |
all-git() { | |
for i in */.git; do | |
gitdir=$(dirname $i); | |
echo $fg[green]">>> repos="$gitdir $reset_color | |
(cd $gitdir && git $@) | |
echo "" | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment