Skip to content

Instantly share code, notes, and snippets.

@RoToRx88
Last active November 25, 2019 17:11
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 RoToRx88/31e20bad89de6ad346866467e4542b77 to your computer and use it in GitHub Desktop.
Save RoToRx88/31e20bad89de6ad346866467e4542b77 to your computer and use it in GitHub Desktop.
Get status of each submodule
#!/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