Last active
November 25, 2019 17:11
-
-
Save RoToRx88/31e20bad89de6ad346866467e4542b77 to your computer and use it in GitHub Desktop.
Get status of each submodule
This file contains hidden or 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 | |
git submodule foreach --recursive --quiet pwd | xargs -P8 -I{} zsh -c 'cd {} && pwd | {grep -o "[^/]*$"; git branch | grep \*;} | tr "\n\*" " " && $(git status --porcelain=v1 1>/dev/null) && echo " Clean" || echo " *Dirty*"; printf "\n"' | column -t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment