Created
January 8, 2018 15:56
-
-
Save cossio/7ddf9a342ba05aa762c285d1d89fa706 to your computer and use it in GitHub Desktop.
I keep this script around which lets me apply a git command to every subdirectory:
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
#!/usr/bin/env zsh | |
submodules=("${(@f)$(find . -type d -depth 1)}") | |
for submodule in $submodules | |
do | |
print "=== $submodule" | |
git --work-tree=$submodule --git-dir=$submodule/.git $* | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/a/48153471/855050