Skip to content

Instantly share code, notes, and snippets.

@slode
Last active May 15, 2019 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save slode/9bcba0de231a5179959c87fefb3d1f83 to your computer and use it in GitHub Desktop.
Save slode/9bcba0de231a5179959c87fefb3d1f83 to your computer and use it in GitHub Desktop.
zsh function for running a command in multiple git repositories
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